Re: [csswg-drafts] [css-fonts] It should be possible to slant glyphs to the left for italics/oblique (#8914)

After talking with the i18n group on a teleconf about this, I think we have few sub-issues here. Quite possibly they should all be filed as separate things, but since they stem from this discussion, here they are, to get started.

* when asking for oblique specifically, falling back to italics is not a good idea. The [paragraph that defines oblique](https://drafts.csswg.org/css-fonts-4/#valdef-font-style-oblique-angle--90deg-90deg) seems in agreement with that, but the paragraph after that muddles the issue, and picks “a font to use which is closest to the requested angle” seemingly without regard for italics vs oblique. Going from oblique to italics is probably not intended, but that should be clarified.

* “a font to use which is closest to the requested angle” may not be fine if the closest one doesn't have the same sign. Let's say you're asking for -12deg, and there's +10deg and +20deg. Clearly, +20deg is not what you want, but there's a fair chance that the direction of the slant matters more than the exact angle, and that you'd rather have synthetic -12deg rather than +10deg. For italics that might be debatable (correct letter-shape might matter more than correct direction, though maybe not), but for oblique it's pretty clear that you'd want the right direction, even if that means synthesis.

* `font-synthesis-style`(“controls whether user agents are allowed to synthesize oblique font faces when a font family lacks oblique faces.”) having only a choice of `auto | none` where `none` means “Synthesis of oblique faces is not allowed”. Seems not quite right, or at least insufficient. Turning off synthesis of oblique faces **when italics is requested** seems like the right thing to do, but as written, it also turns off synthesis of oblique faces when oblique is requested. Unlike italics, oblique is easy to synthesize. So, we might want a separate control to turn off synthetic oblique when oblique is requested (or we might not), but the may control that turns off oblique when italics is requested should not also turn off synthetic oblique when oblique is requested.

* We don't seem to have a general system that deals with left leaning italics or obliques. I suspect we might want something like:
    1. a descriptor in `font-face` letting you know if a (non-variable) oblique or italics font face is left or right leaning.
        Maybe: `font-style: auto | normal | italic [left | right]? | oblique [left | right | <angle>{1,2}]?`
        When you don't specify left nor right (on a non variable font), the ua should probably generally assume right, unless the font technology has some built in indicator.
    2. a property asking for one direction or the other
        Maybe: `font-style: normal | italic [left | right]? | oblique [left | right | <angle>]?`

    Then, if you've got italics (or oblique), but they're leaning the opposite way of what was requested, you don't use the provided font-face, and synthesize instead (if `font-synthesis` allows).
    

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 26 July 2023 07:32:22 UTC