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

(0.5 feedback) Text::dimensions should return Rect, not (u32, u32) #583

Open
ozkriff opened this Issue Feb 14, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@ozkriff
Copy link
Contributor

ozkriff commented Feb 14, 2019

Atm, fn calculate_dimensions can't return a bbox with a negative offset which results in a wrong left border of the bounding box when, for example, we're rendering letter "j" with a "Tangerine_Regular.ttf" font:

image

This wasn't intentional, right?

@icefoxen

This comment has been minimized.

Copy link
Contributor

icefoxen commented Feb 14, 2019

I'm going to need to dig up one of those font metrics diagrams with all the possible offsets, aren't I. XD

That said, do you want the full bounding box of the glyph, or do you want the distance between the start of one letter and the next where they intersect with the text's baseline?

@ozkriff

This comment has been minimized.

Copy link
Contributor Author

ozkriff commented Feb 14, 2019

do you want the full bounding box of the glyph, or do you want the distance between the start of one letter and the next where they intersect with the text's baseline?

The former I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.