Re: [csswg-drafts] [css-rhythm-1] Avoiding accidental double spacing

What about discussing Line Grid first? We have WebKit implementation, so this makes us easier to look at examples.

If you open this [jsbin](http://output.jsbin.com/mevuzex/):
1. The 1st box is normal flow without Line Grid. I use Arabic and Myanmar to simulate fallback to taller fonts.
2. The 2nd box is a copy of the 1st box except it has Line Grid applied. In this box, all lines of Arabic and Myanmar consume double units.
3. @dbaron mentioned the `line-box-contain` property in Paris, and fortunately WebKit implements it too, so I applied `line-box-contain: block` to the 3rd box.

![line-grid-double-result](https://user-images.githubusercontent.com/1274377/30597216-55139530-9d91-11e7-9dfa-303f26cf068b.png)

The 2nd box looks perfectly normal and expected result to me, except that author's choice of the rhythm isn't appropriate, but IIUC this issue thinks this result is unexpected and accidental, correct?

The 3rd box is a "fixed pitch layout", not a "vertical rhythm", unless I misunderstand how to use the `line-box-contain` property. I can see, however, in the 3rd box, some may consider Arabic lines are "improved" for this combination of the unit size, font metrics, and internal leadings (non-ink spaces within the font metrics) of this specific font. Is this specific case this issue is talking about?

If we want this behavior automatically, we need to rely on heuristics, as @shans and @tabatkins proposed, because there's no clear method to distinguish Arabic in this case from Myanmar. Heuristics isn't perfect, it won't work if 1px taller than the heuristic value as @frivoal pointed out in Paris, but I think that's the nature of heuristics. If that happens often, we can adjust the heuristics.

So a couple of questions:
1. Is this Arabic case this issue is talking about?
2. If so, do you agree this is a heuristic problem that we need to rely on heuristic solution?

-- 
GitHub Notification of comment by kojiishi
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/938#issuecomment-330561882 using your GitHub account

Received on Tuesday, 19 September 2017 14:41:52 UTC