-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Description
Problem Background
I’m an Asian developer and ran into a common headache: CJK text sometimes showed missing glyphs when the requested font didn’t
have them. Looking at the code, we weren’t using CoreText’s per-run fallback, so we relied on brittle, hard-coded font names
that vary by platform/locale.
Repair plan
- In
CGPath+Segment.swift, use the CTFont attached to each CTRun (kCTFontAttributeName) when drawing glyphs; if it’s
missing, fall back to the requested font. - No API changes, just better resilience for mixed scripts and missing-glyph cases across platforms.
Testing
- Local build succeeds (e.g.
SWIFTPM_PACKAGE_CACHE=/tmp/swiftpm-cache swift build --scratch-path /tmp/swiftpm-scratch). - Manual CLI renders with CJK SVG content display correctly.
Metadata
Metadata
Assignees
Labels
No labels