x/image/font/sfnt: read more glyph metrics #30699
Open
Labels
Milestone
Comments
Change https://golang.org/cl/166477 mentions this issue: |
olt
added a commit
to olt/golang-x-image
that referenced
this issue
Mar 27, 2019
DO NOT SUBMIT Discussion golang/go#30699 Make more glyph metrics like side bearings available with new Font.GlyphMetric method. Change-Id: Iaee8b6d88afc48f21d00bf84219b99f993b3ab9a
sbinet
added a commit
to go-latex/x-image
that referenced
this issue
Jun 4, 2020
Updates golang/go#30699 Font.GlyphBounds returns the glyph's bounding box and advance as expected by the GlyphBounds method of the font.Face interface. Change-Id: Iaee8b6d88afc48f21d00bf84219b99f993b3ab9a
gopherbot
pushed a commit
to golang/image
that referenced
this issue
Jun 9, 2020
Updates golang/go#30699 Font.GlyphBounds returns the glyph's bounding box and advance as expected by the GlyphBounds method of the font.Face interface. Change-Id: Iaee8b6d88afc48f21d00bf84219b99f993b3ab9a Reviewed-on: https://go-review.googlesource.com/c/image/+/166477 Reviewed-by: Nigel Tao <nigeltao@golang.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aligning text (left/right) requires access to more glyph metrics then AdvanceX. The side bearings (LSB/RSB) are required to know how much "whitespace" there is left/right of a glyph.
I'd like to propose a GlyphMetrics method which calculates and returns the LSB, RSB, Width and AdvanceX.
CL with working prototype is on its way.
The text was updated successfully, but these errors were encountered: