Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing glyphs for < and > in SansSerif fonts #3127

Open
lexi-lambda opened this issue Jul 21, 2021 · 2 comments
Open

Missing glyphs for < and > in SansSerif fonts #3127

lexi-lambda opened this issue Jul 21, 2021 · 2 comments

Comments

@lexi-lambda
Copy link

The < and > characters have no defined metrics for SansSerif family fonts, so they are rendered in roman rather than sans-serif even when enclosed in \textsf, which is inconsistent with LaTeX. For example, consider this sequence in text mode:

< \textsf{<} \textsf{\textless}

LaTeX renders both of the second two less-than signs in sans-serif font:

LaTeX output screenshot

However, KaTeX renders all three in the same (roman) font:

KaTeX output screenshot

The difference appears minor, but when combined with other sans-serif characters, the difference in stroke width is more jarring.

Environment (please complete the following information):

  • KaTeX Version: 0.13.11
@edemaine edemaine changed the title Missing metrics for < and > in SansSerif fonts Missing glyphs for < and > in SansSerif fonts Jul 21, 2021
@edemaine edemaine added the fonts label Jul 21, 2021
@edemaine
Copy link
Member

I've confirmed that those glyphs are indeed missing from the SansSerif fonts. Thanks for the report.

@lexi-lambda
Copy link
Author

Ah—you are right that the glyphs are missing altogether, not just the metrics; that’s my bad. I thought I had checked by manually adding the textsf class to a span containing a < character, which appeared to work, but it looks like my system font’s fallback character just happens to look similar enough to the SansSerif fonts to blend in. (I guess, looking at the source code more carefully, that is to be expected—it looks like only the glyphs with defined metrics are included in the generated fonts to begin with.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants