Skip to content

Add support for tabular numbers and slashed zeros, kerning pairs from OTF fonts, style name + descent extra info, hinting options. Add support for secondary font. Allow unicode whitespace characters. #33

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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

tinic
Copy link

@tinic tinic commented Apr 15, 2025

Note, I don't expect this to be merged upstream. This just shows how this could be accomplished.

  • use HarfBuzz glyph shaping to obtain 'kerning' values from OTF. This seems to work better with some fonts than others.
  • Add --all-chars option to include all available glyphs in a font.
  • Add --secondary-font-file option to specify a second font to use if a glyph was not found in the primary font. This can be useful if you want to include symbols like for instance from "Font Awesome" or similar which provide OTF fonts with custom unicode entries with useful icons, especially for embedded applications.
  • Add style name and descent to the extra-info.
  • add tabular number support (non-proportional numbers) which is useful when rendering changing numbers using proportional fonts. This depends on the font, but most modern fonts support this. I did my testing with 'SF Compact Display Bold' at 18 pixels height on a monochrome LCD display.
  • add an option to get a slashed zero from the font if it supports it.
  • Always allow unicode whitespace characters to be included, i.e. bypass the empty check for those.
  • Fuzz around with hinter values and make them options. Probably not a good way to go about this since the auto hinter should probably still be the default, though I prefer light hinting in most cases.
  • Add larger default set of texture sizes as most GPUs support it these days and it saves complexity on the implementation side.

@tinic tinic changed the title Add support for tabular numbers and slashed zeros Add support for tabular numbers and slashed zeros, kerning parts from OTF fonts, style name + descent extra info, hinting options May 10, 2025
@tinic tinic changed the title Add support for tabular numbers and slashed zeros, kerning parts from OTF fonts, style name + descent extra info, hinting options Add support for tabular numbers and slashed zeros, kerning pairs from OTF fonts, style name + descent extra info, hinting options May 10, 2025
@tinic tinic changed the title Add support for tabular numbers and slashed zeros, kerning pairs from OTF fonts, style name + descent extra info, hinting options Add support for tabular numbers and slashed zeros, kerning pairs from OTF fonts, style name + descent extra info, hinting options. Add support for secondary font. May 10, 2025
@tinic tinic changed the title Add support for tabular numbers and slashed zeros, kerning pairs from OTF fonts, style name + descent extra info, hinting options. Add support for secondary font. Add support for tabular numbers and slashed zeros, kerning pairs from OTF fonts, style name + descent extra info, hinting options. Add support for secondary font. Allow unicode whitespace characters. May 10, 2025
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