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

[WIP] Vertical alignment #293

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

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