You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Issue from discussions with @kojiishi... I thought I'd filed the issue, but apparently not.)
Imagine a paragraph with one main font and one secondary font (e.g. for code snippets). Under the CSS Inline Layout 3 model (and setting text-edge: text), we would use the main font to determine the spacing and the position of the baseline, and we would align the secondary font by its baseline.
Suppose, for simplicity, the font ascent + descent = 1em exactly ;) and the first font has its baseline at 0.2em and the second one at 0.25em.
---- <- top edge
<- 0.8em vs 0.75em
-----<- baseline
<- 0.2em vs 0.25em
-----<- bottom edge
If we are double-spacing the paragraph, the gaps will be 1em. The second font's top and bottom edges will be shifted 0.05em down from the first font wherever it appears on a line. But it's OK, 0.05em fits within the gap, so under our new model, the spacing remains consistent, no problem.
But now imagine we have an entire second paragraph where the main font is the secondary font. It has consistent 2em spacing between baselines within itself, no problem. But between the primary-font paragraph and the secondary-font paragraph we have two incompatible choices:
A) Maintain exactly 1em between the bottom edge of the first paragraph and the top edge of the second paragraph.
B) Maintain exactly 2em between the last baseline of the first paragraph and the first baseline of the second paragraph.
Because of the differences in the font metrics, we cannot have both things. The current model gives us A, but not B. Do we need to make B possible? If so, how should we do it?
The text was updated successfully, but these errors were encountered:
(Issue from discussions with @kojiishi... I thought I'd filed the issue, but apparently not.)
Imagine a paragraph with one main font and one secondary font (e.g. for code snippets). Under the CSS Inline Layout 3 model (and setting
text-edge: text
), we would use the main font to determine the spacing and the position of the baseline, and we would align the secondary font by its baseline.Suppose, for simplicity, the font ascent + descent = 1em exactly ;) and the first font has its baseline at 0.2em and the second one at 0.25em.
If we are double-spacing the paragraph, the gaps will be 1em. The second font's top and bottom edges will be shifted 0.05em down from the first font wherever it appears on a line. But it's OK, 0.05em fits within the gap, so under our new model, the spacing remains consistent, no problem.
But now imagine we have an entire second paragraph where the main font is the secondary font. It has consistent 2em spacing between baselines within itself, no problem. But between the primary-font paragraph and the secondary-font paragraph we have two incompatible choices:
Because of the differences in the font metrics, we cannot have both things. The current model gives us A, but not B. Do we need to make B possible? If so, how should we do it?
The text was updated successfully, but these errors were encountered: