Skip to content

fix: propagate FontFlags::SYMBOLIC to TrueType glyph resolver#126

Merged
Velli20 merged 1 commit intomainfrom
fix-symbolic-font
Apr 12, 2026
Merged

fix: propagate FontFlags::SYMBOLIC to TrueType glyph resolver#126
Velli20 merged 1 commit intomainfrom
fix-symbolic-font

Conversation

@Velli20
Copy link
Copy Markdown
Owner

@Velli20 Velli20 commented Apr 11, 2026

Read the /Flags entry from the font descriptor and store it on TrueTypeFont. Pass FontFlags::SYMBOLIC through to TrueTypeFontRenderer so that resolve_simple_gid_impl can correctly gate fallback behaviour: non-symbolic fonts return None when no cmap entry is found (skip draw, advance with .notdef metrics); symbolic fonts fall back to treating the char code as a raw glyph index.

Also give Standard 14 fallback fonts a default StandardEncoding so that simple char-code → glyph-name lookups work without an explicit /Encoding entry in the PDF.

Read the /Flags entry from the font descriptor and store it on
TrueTypeFont.  Pass FontFlags::SYMBOLIC through to TrueTypeFontRenderer
so that resolve_simple_gid_impl can correctly gate fallback behaviour:
non-symbolic fonts return None when no cmap entry is found (skip draw,
advance with .notdef metrics); symbolic fonts fall back to treating the
char code as a raw glyph index.

Also give Standard 14 fallback fonts a default StandardEncoding so that
simple char-code → glyph-name lookups work without an explicit /Encoding
entry in the PDF.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Velli20 Velli20 force-pushed the fix-symbolic-font branch from 52958ac to b27e5e7 Compare April 12, 2026 11:09
@Velli20 Velli20 merged commit a2f50fc into main Apr 12, 2026
4 checks passed
@Velli20 Velli20 deleted the fix-symbolic-font branch April 12, 2026 11:18
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