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
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: