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 more glyph metrics #30699

olt opened this issue Mar 9, 2019 · 1 comment

x/image/font/sfnt: read more glyph metrics #30699

olt opened this issue Mar 9, 2019 · 1 comment


Copy link

@olt olt commented Mar 9, 2019

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.

@gopherbot gopherbot added this to the Unreleased milestone Mar 9, 2019

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Mar 9, 2019

Change mentions this issue: font/sfnt: implement Font.GlyphMetrics

olt added a commit to olt/golang-x-image that referenced this issue Mar 27, 2019

Discussion golang/go#30699

Make more glyph metrics like side bearings available with new
Font.GlyphMetric method.

Change-Id: Iaee8b6d88afc48f21d00bf84219b99f993b3ab9a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.