x/image/font/sfnt: read more glyph metrics #30699
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:
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 <firstname.lastname@example.org>