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

Fix measuring text height #69

Merged
merged 1 commit into from
Mar 12, 2018
Merged

Conversation

marek-g
Copy link

@marek-g marek-g commented Mar 12, 2018

This is a change that was already mentioned as "todo" in measure function's comment. Height returned from measure() function is always font's height in pixel.

It's taken from font size metrics so it gives better result than suggested max of all glyphs height as it also includes nice bottom margin (similar to top margin from bitmap_top). Drawing box from returned values gives a nice rounding box.

@Kagami Kagami merged commit 174a10c into PistonDevelopers:master Mar 12, 2018
@Kagami
Copy link
Member

Kagami commented Mar 12, 2018

Thanks!

@marek-g
Copy link
Author

marek-g commented Mar 12, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants