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

Improve glyph positioning #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Improve glyph positioning #25

wants to merge 2 commits into from

Conversation

moshev
Copy link

@moshev moshev commented Mar 24, 2016

Right now font-height is calculated by guesswork, which is completely unneeded given that font-size is the font's height. The guesswork approach can lead to glyphs slightly offset from centre with some fonts, e.g. Courier Prime. You can see a [http://imgur.com/yKblb0I](comparison here).

Additionally, given that we know the height of a line in pixels and the height of a glyph, the margin calculation can be much simpler.

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