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

x/image/font/sfnt: read kerning from GPOS #29528

Closed
olt opened this issue Jan 3, 2019 · 2 comments
Closed

x/image/font/sfnt: read kerning from GPOS #29528

olt opened this issue Jan 3, 2019 · 2 comments

Comments

@olt
Copy link
Contributor

olt commented Jan 3, 2019

Most modern fonts like Noto or Roboto do not provide a kern table. Instead they use the GPOS table for kerning.

GPOS can be quite complex and it also supports y-displacements which is not supported by the current font.Face API. I'm also aware that text shaping is a complex topic and out of scope for x/image/font/sfnt. However, Face.Kern is already available in the API for basic kerning and it would be great to be able to use this with (nearly) all fonts, at least for latin scripts.

Would you accept a patch that reads kerning information from GPOS, if kern is not available? Or is this out of scope already?

/cc @nigeltao

@gopherbot gopherbot added this to the Unreleased milestone Jan 3, 2019
@nigeltao
Copy link
Contributor

nigeltao commented Jan 9, 2019

I'd take a patch that read kerning information from GPOS, especially if it didn't involve any new public API.

Longer term, I'd also like public API to expose the GPOS table, as that would be needed by text shapers, but that (API design) is a much harder problem, especially without an actual text shaping implementation to shake out any design bugs.

@gopherbot
Copy link

Change https://golang.org/cl/159638 mentions this issue: font/sfnt: support for kerning from GPOS tables

olt added a commit to olt/golang-x-image that referenced this issue Jan 28, 2019
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
@golang golang locked and limited conversation to collaborators Feb 9, 2020
mrhyperbit23z0d added a commit to mrhyperbit23z0d/bhegde8 that referenced this issue Jun 6, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
GalaxyForcew added a commit to GalaxyForcew/A1bisshy that referenced this issue Jun 6, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
yi-ge3 added a commit to yi-ge3/wislie that referenced this issue Jun 6, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
balloontmz6 added a commit to balloontmz6/Likewise42l that referenced this issue Jun 6, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
snapbakkhfbav added a commit to snapbakkhfbav/SayedBaladohr that referenced this issue Oct 6, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
MiderWong5ddop added a commit to MiderWong5ddop/sidie88f that referenced this issue Oct 7, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
rorypeckwnt4v added a commit to rorypeckwnt4v/LearnByBhanuPrataph that referenced this issue Oct 7, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
egorovcharenko9 added a commit to egorovcharenko9/RiceBIOC470z that referenced this issue Oct 7, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
RafayGhafoorf added a commit to RafayGhafoorf/dustinsand8 that referenced this issue Oct 7, 2022
This CL adds support for reading kerning information from GPOS tables.

Most modern fonts like Noto or Roboto do not provide a kern table.
Instead they use the GPOS table for kerning.

This CL is limited to horizontal kerning and latin scripts.

The proprietary_test was extended to check all supported variations.
gpos.go has full test coverage (excluding error conditions).
Additionally, the new TestBulkKern (opt-in) can be used to check parsing
of large font collection.

Fixes: golang/go#29528

Change-Id: I9f1ae142c9e26170dd836ccaca1526bbefe9698a
Reviewed-on: https://go-review.googlesource.com/c/159638
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants