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

Open
olt opened this issue Mar 9, 2019 · 1 comment
Open

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

olt opened this issue Mar 9, 2019 · 1 comment
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@olt
Copy link
Contributor

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
@gopherbot
Copy link

Change https://golang.org/cl/166477 mentions this issue: font/sfnt: implement Font.GlyphMetrics

@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Mar 10, 2019
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 pushed 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
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

3 participants