-
Notifications
You must be signed in to change notification settings - Fork 27
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
Incorrect contour extraction and rendering of DFKai-SB glyphs #1303
Comments
Sorry, the font is not, only the PDF that embeds it. I am working on extracting it. |
Font extracted from PDF by setting breakpoints on CSS FontFace creation in the pdf.js code.
|
According to https://learn.microsoft.com/en-us/typography/fonts/windows_11_font_list#traditional-chinese and https://learn.microsoft.com/en-us/typography/font-list/dfkai-sb#products-that-supply-this-font 5.01 seems to be the latest version of this font. |
So it turns out that this is one of the "tricky" fonts that requires the bytecode interpreter to generate a correct outline. If I run these through skrifa with the target set to Since our API doesn't handle hinting internally, this isn't something we can just fix. What we can do is copy FreeType's tricky font detection and expose it as a method (maybe |
Implements the family name part of FreeType's "tricky" font detection. This is sufficient to address the problematic font in #1303. Adds an `OutlineGlyphCollection::require_interpreter()` method that can be used to determine if hinting (with the interpreter engine) is required to correctly render glyphs from the font. FreeType has some additional checks on length/checksums of various tables. I'll do that in a follow up.
Implements the family name part of FreeType's "tricky" font detection. This is sufficient to address the problematic font in #1303. Adds an `OutlineGlyphCollection::require_interpreter()` method that can be used to determine if hinting (with the interpreter engine) is required to correctly render glyphs from the font. FreeType has some additional checks on length/checksums of various tables. I'll do that in a follow up.
https://rtsh.es/test/dfkai_pdf.html hosts a
PDF.js
view of a PDF that displays glyphs from Microsofts's DFKai-SB fonthttps://learn.microsoft.com/en-us/typography/font-list/dfkai-sb
Two of the glyphs appear compressed with incomplete contour shapes.
vs expected:
I'll try to provide a further reduction.
The font is available as an attachment of the upstream bug report: https://issues.chromium.org/387045808
The text was updated successfully, but these errors were encountered: