-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Use line height based spacing model #4236
Conversation
8183d22
to
691c198
Compare
My suggestion is to find a value that keeps the line spacing unchanged in most tests... |
It's impossible. Previously, the line height in typst is...(guess what?) 7.15(leading) + 7.240234375(asc) = 14.390234375pt. And this means that if we want it looks the same, the line-height would be 1.3082031250000001em or so. But when i set it to 1.3082031250000001, the calculated leading is 7.150000000000002. And if i set it to the next float using Anyway, i think it may not affect test a lot. I will set it to 1.308203125 at this moment |
9052a0f
to
9314792
Compare
let leading = if EquationElem::size_in(styles) >= MathSize::Text { | ||
ParElem::leading_in(styles) | ||
} else { | ||
let font_size = scaled_font_size(ctx, styles); | ||
TIGHT_LEADING.at(font_size) | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyidea what is tight leading? Is it a workaround or something?
2ec8a95
to
d5a5a05
Compare
I just want to comment that #4318 may be a possible predecessor for the line height adjust solution can avoid breaking the test. This PR (#4318) is an attempt to support #2200 (I intend to do this and then refactor draft PR #3953), and I think it should be relevant so I think you might be interested to take a look at it. |
4848e48
to
cd35a2e
Compare
cd35a2e
to
89fd452
Compare
89fd452
to
0b20a8a
Compare
0b20a8a
to
ead3e93
Compare
I think until we have a solution that properly fixes the equation problem (for the first line and the last line as well), I'd refrain from making any changes. (In the interest of only changing things once.) So I'll close this for now. |
fix #1028 fix #4224
The ci is expected to fail since the line height is changed, all of ref images are needed to be updated
TODO: