Re: [csswg-drafts] [css-fonts] Vertical text doesn't play nicely with font-style and font-stretch (#4044)

The CSS Working Group just discussed `[css-fonts] Vertical text doesn't play nicely with font-style and font-stretch`, and agreed to the following:

* `RESOLVED: Adopt the proposal for font-stretch`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> Topic:  [css-fonts] Vertical text doesn't play nicely with font-style and font-stretch<br>
&lt;emilio> Github:https://github.com/w3c/csswg-drafts/issues/4044<br>
&lt;emilio> ??: CJK text differs from latin because of the multiple orientations<br>
&lt;emilio> .. because of that multiple features related to the line width become quite complex<br>
&lt;emilio> ... [explains example in the issue]<br>
&lt;emilio> ... depending on the glyph orientation glyphs get stretched in different directions<br>
&lt;emilio> ... as a user is backwards, as an implementor you need to poke at the internal characters<br>
&lt;emilio> ... while the feature is about stretching the whole line<br>
&lt;emilio> myles: this was discussed in OpenType and there was some discussion<br>
&lt;emilio> ... the font can't know how to do it right and there's an opentype feature that only gets applied to upright characters<br>
&lt;emilio> ... but it's pretty hard to set up<br>
&lt;emilio> ... so opentype would introduce a new axis<br>
&lt;emilio> ... vertical and horizontal width<br>
&lt;emilio> ... and the application would set the relevant vertical / horizontal axis depending on whether the glyph is upright or not<br>
&lt;emilio> ... no resolutions anywhere yet but need to move it together<br>
&lt;emilio> ... so we need font-face descriptor to say that it supports stretching in the vertical axis or not<br>
&lt;emilio> ... so plan is to extend font-stretch to specify using a `vertical` direction that it's stretched in the vertical axis<br>
&lt;nmccully> s/??/nmccully<br>
&lt;emilio> ... the font-stretch property wouldn't change syntax, but it'd change behavior<br>
&lt;emilio> ... rotating the font in the appropriate direction<br>
&lt;emilio> ... which means that writing-mode and text-combine and such would also be inputs to the font selection algorithm<br>
&lt;emilio> ... because if it's vertical it'd need to download the font that can expand in the vertical axes<br>
&lt;emilio> ... thoughts?<br>
&lt;emilio> fantasai: sgtm<br>
&lt;emilio> leaverou: would the property change?<br>
&lt;emilio> myles: the property has no grammar change but has behavior change<br>
&lt;emilio> nmccully: you may need it for TCY<br>
&lt;emilio> myles: the system I'm describing would either select an horizontal or vertical font, but it's important that fonts can support both so you don't require different files for fonts that support both japanese and latin scripts<br>
&lt;emilio> ... everything I've said also applies to font-style (for the italic angle)<br>
&lt;emilio> koji: what's the syntax proposal?<br>
&lt;emilio> myles: [explains proposal in the issue]<br>
&lt;emilio> myles: The OpenType piece is that we need to standardize a new axis for vertical width and for non-vertical font you also need a vertical width<br>
&lt;emilio> nmccully: Adobe has formed an opinion already and has a prototype<br>
&lt;heycam> q+<br>
&lt;emilio> koji: should it be physical or logical?<br>
&lt;emilio> fantasai: for font needs to be physical<br>
&lt;Rossen_> ack jcraig<br>
&lt;Rossen_> ack ?<br>
&lt;emilio> ... when you're typesetting vertical text you mix both upright and rotated characters, for the glyph's perspective depends on the uprightness<br>
&lt;emilio> ... upright chars get "longer" in the vertical axes, the other keeps the same height but<br>
&lt;emilio> ... so for the font descriptor it needs to be physical and the property is logical and only applies in the inline direction<br>
&lt;emilio> koji: so you're saying physical to line orientation not to glyph orientation<br>
&lt;emilio> fantasai: font-stretch is line-relative and the font-stretch capability in the font file is physical relative to the glyph orientation<br>
&lt;fantasai> koji: agree<br>
&lt;emilio> myles: [explains that in a different way]<br>
&lt;emilio> koji: agree<br>
&lt;emilio> ack heycam<br>
&lt;emilio> heycam: I think proposal makes sense, I'd like to understand how authors can achieve this without this feature and how difficult that is compared to the font<br>
&lt;emilio> nmccully: the browser would have to know how each browser treats the font (regarding upright-ness)<br>
&lt;emilio> ... then go browser by browser and change fonts per rune<br>
&lt;emilio> heycam: so part of the issue is that browsers disagree on that, right? (fantasai mentioned punctuation before)<br>
&lt;emilio> fantasai: yeah, even by that is a per-codepoint thing<br>
&lt;emilio> fantasai: the initial values of text-orientation mix orientation by default, the author would have to do the automated determination of rotated vs. not for the particular font<br>
&lt;emilio> ... way too much work to request on an author<br>
&lt;emilio> nmccully: it's mixing two things, whether something is sideways is not the author decision<br>
&lt;emilio> ... it's automated based in unicode-range<br>
&lt;emilio> heycam: Oh I assumed that authors would have expectations and browsers would be consistent<br>
&lt;emilio> fantasai: I think this is the right design, I think it works great for font-stretch<br>
&lt;emilio> ... for oblique and such it may not<br>
&lt;emilio> myles: there's another piece. Today if you say font-style: italic on vertical text you'll get weird stuff<br>
&lt;emilio> ... this proposal will fix that<br>
&lt;emilio> fantasai: don't we have a resolution on that?<br>
&lt;emilio> florian: I think hiroshi wanted to reopen that<br>
&lt;emilio> ... but didn't because nobody seemed to run into a spec<br>
&lt;emilio> Rossen_: would this change this resolution?<br>
&lt;emilio> florian: only if we apply it to font-style<br>
&lt;emilio> fantasai: I think we may have a font-stretch-vertical descriptor rather than stashing it on font-stretch<br>
&lt;emilio> ... but that's more bikeshedding and I generally agree with the proposal<br>
&lt;emilio> Rossen_: objections to adopt this?<br>
&lt;emilio> RESOLVED: Adopt the proposal for font-stretch<br>
</details>


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

Received on Tuesday, 17 September 2019 07:33:50 UTC