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

The CSS Working Group just discussed `inline layout`.

<details><summary>The full IRC log of that discussion</summary>
&lt;jet> Topic: inline layout<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/938<br>
&lt;jet> Florian: from weaknesses of vertcal rythm<br>
&lt;jet> Florian: found lineheight issues from that investigation<br>
&lt;Florian> https://github.com/w3c/csswg-drafts/issues/938#issuecomment-314690847<br>
&lt;jet> Florian: I did a bunch of testing ^<br>
&lt;jet> Florian: shows how browsers differ<br>
&lt;jet> Florian: more interop than expected<br>
&lt;jet> Florian: Safari &amp; Edge are the same<br>
&lt;jet> Florian: Chrome differs<br>
&lt;jet> Florian: Firefox differs<br>
&lt;jet> Florian: when lineheight is a number or length vs. normal<br>
&lt;jet> Florian: refers to diagram from Tokyo discussions<br>
&lt;jet> Florian: (see github issue for diagram)<br>
&lt;jet> Florian: can't figure out Chromium baseline alignment<br>
&lt;jet> Florian: why does chrome behave this way?<br>
&lt;jet> Florian: we should fork the issue for general lineheight<br>
&lt;jet> Florian: we need to define base behavior of lineheight<br>
&lt;jet> fantasai: because rhythm depends on lineheight<br>
&lt;fantasai> fantasai: because the trigger to round up for rhythm depends on the computation of line height<br>
&lt;fantasai> myles_: and you can double spacing in some UAs not others if those computations differ<br>
&lt;fantasai> fantasai: right<br>
&lt;jet> Florian: goal is general interop on lineheight<br>
&lt;jet> astearns: discuss divergence on lineheight:normal<br>
&lt;jet> Florian: can isolate individual bugs<br>
&lt;jet> ACTION: Florian to file bugs with each case<br>
&lt;trackbot> Error creating an ACTION: could not connect to Tracker.  Please mail &lt;sysreq@w3.org> with details about what happened.<br>
&lt;jet> fantasai: we don't have a spec for these issues<br>
&lt;fantasai> astearns: but we have interop except for chrome<br>
&lt;fantasai> astearns: so Chrome should figure out whether there's a reason to diverge, or whether they will fix it<br>
&lt;fantasai> astearns: and then we can spec the result of that discussion<br>
&lt;jet> Florian: for lineheight:normal Chrome differs by using the top of the tallest used fonts<br>
&lt;jet> Florian: will file a bug on that one<br>
&lt;jet> koji: we need to see the test<br>
&lt;jet> Florian: we'll debug later<br>
&lt;jet> Florian: I had to find fonts with tall ascenders and long descenders<br>
&lt;jet> Florian: Firefox font metrics differ<br>
&lt;jet> Florian: not sure why<br>
&lt;fantasai> myles_: If a browser changes the metrics they read from a font, every web page will look different. At least for us, that would be almost certainly unlikely to happen.<br>
&lt;jet> myles: if a browser changes metrics per font, every web page will render differently<br>
&lt;jet> Florian: in some cases Firefox is the same<br>
&lt;jet> dbaron: platform API's differ for metrics<br>
&lt;jet> koji: everyone has 3 font metrics<br>
&lt;jet> Florian: Chrome &amp; Safari same on Mac<br>
&lt;jet> Florian: Chome &amp; Edge same on WIndows<br>
&lt;jet> myles: some fonts are just weird<br>
&lt;fantasai> myles_: For at least font on at leats one platform, at least one of the metrics of the font returned by the system API doesn't appear anywhere in the font<br>
&lt;jet> Florian: the tests aren't clear re: metrics, but does show the divergence<br>
&lt;jet> Florian: I checked the content box for inlines--also no interop<br>
&lt;jet> Florian: on Chrome, doesnt depend on font metrics or lineheight<br>
&lt;jet> fantasai: spec says content box can't depend on lineheight<br>
&lt;jet> Florian: Firefox depends on font metrics and not lineheight<br>
&lt;jet> Florian: notes Chrome bugs<br>
&lt;jet> fantasai: is it 1 em?<br>
&lt;jet> fantasai: 1 em is at least predictable<br>
&lt;jet> Florian: not 1 em<br>
&lt;dbaron> FWIW, Gecko has 4 platform-specific font backends: (1) FreeType (used on Linux and Android), (2) Mac (3) GDI (Windows) and (4) DirectWrite (also Windows)<br>
&lt;jet> Florian: more testing needed<br>
&lt;jet> Bert: CSS2 recommends 1em or height of the ascender to descender<br>
&lt;Bert> ". The height of the content area should be based on the font, but this specification does not specify how. A UA may, e.g., use the em-box or the maximum ascender and descender of the font. "<br>
&lt;myles_> dbaron: macOS has CoreText and CoreGraphics and they may disagree<br>
&lt;Bert> (This is from CSS2)<br>
&lt;Bert> https://www.w3.org/TR/CSS2/visudet.html#inline-non-replaced<br>
&lt;dbaron> myles_, I think we're using CoreText<br>
&lt;jet> astearns: it differs depending on the platform font subsystem<br>
&lt;myles_> dbaron: 💯<br>
&lt;dbaron> myles_, er, wait, there's a pointer to both objects :-P<br>
&lt;myles_> dbaron: 💯💯✅<br>
&lt;jet> Florian: Firefox differs with Outlines<br>
&lt;dbaron> myles_, InitMetrics seems to use mostly CG* APIs<br>
&lt;jet> Florian: outline allows a lot of leeway<br>
&lt;jet> Florian: and Firefox diverges most<br>
&lt;jet> Florian: please review the tests<br>
&lt;jet> astearns: file the bugs and have the browser engineers challenge<br>
&lt;jet> fantasai: we want interop and sane behavior so file spec bugs not browser bugs<br>
&lt;jet> fantasai: resolve on content box height?<br>
&lt;dbaron> myles_, I think we use Core Text only for fonts with color bitmap glyphs<br>
&lt;fantasai> Florian: we have 3 behaviors, Chrome I can't figure out at all. Doesn't seem to depend on line height or font metrics<br>
&lt;fantasai> Florian: Firefox ....<br>
&lt;jet> astearns: if we file a Chrome bug, we can get interop<br>
&lt;jet> astearns: despite no spec<br>
&lt;jet> fantasai: we should specify what the TTML folks can use<br>
&lt;dbaron> I think there are probably much larger audiences than the TTML folks who care about this.<br>
&lt;jet> Florian: using ascender/descender lengths is unpredictable<br>
&lt;fantasai> dbaron, not sure who that is, but pretty sure they'd agree on having something controllable and predictable<br>
&lt;jet> dbaron: may be concerns re: e.g., accent marks<br>
&lt;jet> dbaron: and script-specific issues<br>
&lt;dbaron> s/accent marks/accent marks not hanging out of the background/<br>
&lt;dbaron> s/script-specific issues/that might be more important for Vietnamese than for English/<br>
&lt;jet> Florian: content box depending on font metrics is very unpredictable<br>
&lt;jet> Florian: we can resolve on Safari/Edge behavior re: lineheight:normal being a bug<br>
&lt;jet> Florian: lineheight != normal returns different sizes<br>
&lt;jet> astearns: curently not a spec violation<br>
&lt;astearns> but we should probably make it one<br>
&lt;jet> fremy: we can't resolve if we don't know what to spec<br>
&lt;dbaron> I think it is a violation of https://drafts.csswg.org/css2/visudet.html#inline-non-replaced<br>
&lt;jet> fremy: please file more specific issues<br>
&lt;jet> Florian: we'll split the topic<br>
&lt;astearns> dbaron: fair - "The 'height' property does not apply &lt;to the content area>" does seem to be relevant<br>
&lt;jet> fantasai: file issues against CSS inline and CSS2<br>
&lt;jet> Florian: I tested 2 ways: line stacking and with border. same results<br>
&lt;dbaron> I guess it's violating the "should" that it's based on the font<br>
&lt;jet> fremy: spec proposes 2 solutions<br>
&lt;jet> fremy: not sure how we choose either<br>
&lt;jet> fremy: I need to check Edge code<br>
&lt;fremy> fremy: but maybe we consider line-height to be intent from authors they want control<br>
&lt;jet> Florian: interop is fixable<br>
</details>


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

Received on Friday, 4 August 2017 14:29:24 UTC