-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
Comments
I'd take a patch that read kerning information from Longer term, I'd also like public API to expose the |
Change https://golang.org/cl/159638 mentions this issue: |
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
Most modern fonts like Noto or Roboto do not provide a
kern
table. Instead they use theGPOS
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 forx/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
, ifkern
is not available? Or is this out of scope already?/cc @nigeltao
The text was updated successfully, but these errors were encountered: