Skip to content

Conversation

valadaptive
Copy link
Contributor

This takes one vertical position as the origin, and aligns everything to that, e.g. if you select text-top, the glyph's ascender will be at the origin. This works well if every glyph has the same vertical alignment, but if not, it falls apart (e.g. if one glyph is aligned to text-top, and the next is aligned to text-bottom, they'll be extremely vertically separated). What CSS does is align everything using the metrics of the "parent style".

I didn't get as far as implementing the alignment for actual glyph positioning, only line height calculation.

This takes one vertical position as the origin, and aligns everything to
that, e.g. if you select text-top, the glyph's ascender will be at the
origin. This works well if every glyph has the same vertical alignment,
but if not, it falls apart (e.g. if one glyph is aligned to text-top,
and the next is aligned to text-bottom, they'll be extremely vertically
separated). What CSS does is align everything using the metrics of the
"parent style".

I didn't get as far as implementing the alignment for actual glyph
positioning, only line height calculation.
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.

1 participant