Fix SDF atlas font manager + add --screenshot to demo - #131
Conversation
There was a problem hiding this comment.
💡 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(); |
There was a problem hiding this comment.
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 👍 / 👎.
…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.
…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.
Summary
Verified
Screenshot captured headlessly on macOS (Metal + Skia Graphite), saved to planning/screenshots/sdf-text-demo-macos.png