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

Baseline alignment #169

Closed
wants to merge 3 commits into from

Conversation

therahedwig
Copy link
Contributor

@therahedwig therahedwig commented Apr 20, 2022

This implements set_baseline_tag_range and set_baseline_shift. This patch is build on top of #165 .

The former can use opentype tags like "romn" and "hang", while the latter uses FreeType Font Units, and both values get added to the offset, depending on the direction.

I am not sure if offset is the correct place to add these values, as perhaps that makes it harder to align the caret properly.

Similarly, I am wondering about whether specific baseline-shift for super and sub are still useful here, or whether I should calculate these myself (given they need a font different than the current one to be correct).

Fix #167

@therahedwig
Copy link
Contributor Author

ok, I seem to have made a mistake with the ifdef, but I guess the idea is to upgrade the deps anyway :)

This implements set_baseline_tag_range and set_baseline_shift.

The former can be used to align a glyph with a given
opentype baseline, while the latter can be used to shift the baseline.
This was referenced May 2, 2022
@therahedwig
Copy link
Contributor Author

After much consideration, it really seems CSS-baseline alignment is tree-wise, which Raqm knows nothing about. I had to implement this separately in my textlayout code.

@therahedwig therahedwig closed this Nov 4, 2022
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.

Baseline alignment
1 participant