You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Select bold and italic LocalTypefaces for text styles #142
When TextPainter.LocalTypefaces contains regular, bold, and italic faces from the same family, \textbf{...} and \textit{...} do not select those faces. The renderer currently changes ordinary Latin letters to Unicode Mathematical Alphanumeric Symbols, so it often falls through to a math font instead of selecting the matching local face.
Implement style-aware local typeface selection before the Mathematical Alphanumeric Symbols fallback.
Acceptance criteria:
LocalTypefaces can identify or map regular, bold, italic, and bold-italic faces in a family.
\textbf and \textit select the matching local face when it contains the requested glyph.
Mathematical Alphanumeric Symbols remain a fallback for math fonts and for families without a requested style.
Mixed regular/bold/italic text preserves expected advances and baseline alignment.
Tests use redistributable font fixtures and cover missing-style fallback.
The separate inter-glyph spacing/italic-correction problem from the original report is tracked by #32.
The right solution would be to refactor FontChanger to only use Mathematical Alphanumeric Symbols as a fallback after a reading LocalTypefaces for font styles. Perhaps add an extension point for custom FontStyle to LaTeX command as well.
Triage update: the current implementation confirms this is style-aware font fallback work, not a parser defect. I narrowed the issue to selecting bold/italic LocalTypefaces, changed it to an enhancement, and moved the separate spacing/italic-correction concern to #32.
Activity
Happypig375 commentedon Jun 26, 2020
The bold and italic glyphs used are in the Unicode range https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols. Fonts should provide glyphs for characters in this range instead of the ASCII range.
Happypig375 commentedon Jun 26, 2020
Looks like a bug.
Happypig375 commentedon Jul 16, 2020
I assume the
FontStylesbranch is linked to this bug. Assigned to @charlesroddie.Happypig375 commentedon Feb 13, 2026
The right solution would be to refactor FontChanger to only use Mathematical Alphanumeric Symbols as a fallback after a reading LocalTypefaces for font styles. Perhaps add an extension point for custom FontStyle to LaTeX command as well.
[-]Bold and Italic fonts[/-][+]Bold and italic overrides for LocalTypefaces[/+][-]Bold and italic overrides for LocalTypefaces[/-][+]Select bold and italic LocalTypefaces for text styles[/+]Happypig375 commentedon Aug 30, 2026
Triage update: the current implementation confirms this is style-aware font fallback work, not a parser defect. I narrowed the issue to selecting bold/italic LocalTypefaces, changed it to an enhancement, and moved the separate spacing/italic-correction concern to #32.