-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/image/font/opentype: font metrics discrepancies wrt golang/freetype/truetype #45176
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
cagedmantis
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Mar 25, 2021
/cc @nigeltao |
gentle ping? |
Sorry, I don't have a lot of free time right now to investigate. Do you know what the C FreeType library reports? (Ideally with a small reproducible C program). |
I looked a bit into this, and I can share the following:
Despite all this, I still have some concerns:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
hi,
it seems parsing the same TTF files (Liberation fonts, for example) leads to different font metrics values.
I'd like to understand whether that's coming from a bug/oversight from
x/image/font/sfnt
or fromfreetype/truetype
.What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/BM_FTuuxrxF
What did you expect to see?
reasonnable agreement between font metrics extracted from a TTF file via
x/image
and viafreetype/truetype
.freetype/truetype
doesn't extract XHeight, CapHeight nor CaretSlopebut apart from those known differences, (and the glyph bounds), nothing really matches.
What did you see instead?
The text was updated successfully, but these errors were encountered: