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

GPOS Support #77

Open
Lachee opened this issue Jun 22, 2020 · 1 comment
Open

GPOS Support #77

Lachee opened this issue Jun 22, 2020 · 1 comment

Comments

@Lachee
Copy link

Lachee commented Jun 22, 2020

This package doesn't support GPOS. Fonts from Google's Font library do not work as they use the GPOS table instead of the kern table.

Using https://fontdrop.info/, you can see that the font NOTABLE does not have a kern table. However, FontDrop states in the "OT" tab that the font has a GPOS table. It appears that this package is ignoring that table and is ONLY using the kern table.

This is fine like old fonts such as Luxirr, but many fonts now available just use the GPOS table exclusively. It seems like every font I get from Google Font seems to exclude the kern table.

        kernA := rune('A')
	kernB := rune('V')
	fontKern := fontSrc.Kern(fixed.I(1), fontSrc.Index(kernA), fontSrc.Index(kernB))
	faceKern := fontFace.Kern(kernA, kernB)
	log.Println("Kern between", string(kernA), string(kernB), ". Face:", faceKern, ", Font:", fontKern)

Notable (from Google Font):
Kern between A V . Face: 0:00 , Font: 0:00
Lexirr (from GitHub Example):
Kern between A V . Face: -11:43 , Font: -0:07

As you can see, the Kern function does nothing for fonts using GPOS instead of Kern.

The irony that Google's own language doesn't support fonts provided by Google.

@rcoreilly
Copy link

this package is not being supported (PR's not even being merged).. I'm trying to keep an updated version with all PR's integrated in my fork at: https://github.com/goki/freetype so if you submit a PR to fix this I will merge it there..

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

No branches or pull requests

2 participants