Skip to content

Fix SDF atlas font manager + add --screenshot to demo - #131

Merged
danielraffel merged 1 commit into
mainfrom
fix/sdf-demo-font-manager
Apr 12, 2026
Merged

Fix SDF atlas font manager + add --screenshot to demo#131
danielraffel merged 1 commit into
mainfrom
fix/sdf-demo-font-manager

Conversation

@danielraffel

Copy link
Copy Markdown
Collaborator

Summary

  • Fix SDF atlas font manager: use platform-specific SkFontMgr factories (CoreText/DirectWrite/FreeType) instead of deprecated SkFontMgr::RefDefault()
  • Add --screenshot mode to SDF text demo for headless CI validation

Verified

Screenshot captured headlessly on macOS (Metal + Skia Graphite), saved to planning/screenshots/sdf-text-demo-macos.png

@danielraffel
danielraffel merged commit ef5efe5 into main Apr 12, 2026
7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ec7e3c144

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

#ifdef __APPLE__
auto mgr = SkFontMgr_New_CoreText(nullptr);
#elif defined(_WIN32)
auto mgr = SkFontMgr_New_DirectWrite();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include Windows DirectWrite header before using SkFontMgr_New_DirectWrite

When building with PULP_HAS_SKIA on Windows, this new call to SkFontMgr_New_DirectWrite() has no visible declaration in this translation unit because _WIN32 currently includes SkFontMgr_directory.h instead of the Windows port header that declares DirectWrite (include/ports/SkTypeface_win.h). That causes a compile failure in sdf_atlas.cpp for Windows targets.

Useful? React with 👍 / 👎.

danielraffel added a commit that referenced this pull request Apr 12, 2026
…clude

1. Wire accessibility_android.cpp into pulp-view Android target
   (PulpAndroid.cmake) — the JNI exports existed but were never
   compiled into the Android build (#129 review)

2. Fix Windows SDF atlas include: use SkTypeface_win.h (contains
   SkFontMgr_New_DirectWrite) instead of SkFontMgr_directory.h
   (#131 review)

PR #130 P1 (WindowHost API) and P2 (use_gpu) were already fixed
in PR #131.
danielraffel added a commit that referenced this pull request Apr 12, 2026
…clude (#132)

1. Wire accessibility_android.cpp into pulp-view Android target
   (PulpAndroid.cmake) — the JNI exports existed but were never
   compiled into the Android build (#129 review)

2. Fix Windows SDF atlas include: use SkTypeface_win.h (contains
   SkFontMgr_New_DirectWrite) instead of SkFontMgr_directory.h
   (#131 review)

PR #130 P1 (WindowHost API) and P2 (use_gpu) were already fixed
in PR #131.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant