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

Bitmap fonts #1644

Merged
merged 13 commits into from
Jun 17, 2022
Merged

Bitmap fonts #1644

merged 13 commits into from
Jun 17, 2022

Conversation

liZe
Copy link
Member

@liZe liZe commented May 16, 2022

The goal of this pull request is to handle OpenType bitmap fonts (otb), providing a pixel-perfect rendering when mixed with rasterizers like Ghostscript or Poppler.

Fix #1645.

@liZe liZe added feature New feature that should be supported sponsored Issues sponsored to be resolved faster labels May 16, 2022
@liZe liZe added this to the 56.0 milestone May 16, 2022
@liZe liZe force-pushed the bitmap-fonts branch 2 times, most recently from d261bdf to c419923 Compare May 27, 2022 15:35
liZe added 12 commits June 13, 2022 16:01
This commit breaks other fonts because of the 1-byte characters.
Put everything related to font tweaks into the Font class, where it belongs.
Previously, the base size was 1, meaning that all sizes could be floats. Using
the font size as the base size enables sizes to be integers, avoids rounding
errors and and give pixel-perfect rendering when rasterized.
The glyf table may not be available for such fonts. Fortunately, Fonttools
provides a getGlyphID method on the font object that does what we want with no
assumption about the available tables.
They should actually be 0 if everything goes well.
@liZe liZe merged commit d8533da into master Jun 17, 2022
@liZe liZe deleted the bitmap-fonts branch June 17, 2022 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported sponsored Issues sponsored to be resolved faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support bitmap fonts
1 participant