[csswg-drafts] [css-fonts] Default angle for font-style:oblique should conform to host platform

jfkthame has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts] Default angle for font-style:oblique should conform to host platform ==
Currently the Fonts 4 draft says that if the optional `<angle>` is not specified for `font-style: oblique`, this "represents an angle of "20deg"". However, in my experience the angle used for synthetic-oblique font styling -- which has long been provided by most platform text-drawing APIs, when asked to draw "Italic" text with a font family that only provides Regular -- varies significantly between platforms, with (for example) Windows applying a more pronounced slant than macOS.

In order to better match the "native" text rendering of the platform, therefore, Firefox currently uses a platform-specific value when applying a synthetic-italic/oblique effect. I would suggest that this is appropriate behavior for `font-style: oblique` when no explicit `<angle>` is given, and rather than mandating a specific angle in this case, the spec should say something along the lines of "if an `<angle>` is not specified, the user agent should use a slant angle that harmonizes with the platform's typical text rendering behavior."

Moreover, if we *must* specify a default here, rather than allowing the browser to follow platform conventions, I think `20deg` is too large. Current Firefox behavior -- which was designed to harmonize with host platform behavior -- uses an angle between `11.3deg` and `16.7deg`. Checking the `italicAngle` field in a sampling of actual italic/oblique fonts shows values that cluster around 11°-12°, with occasional outliers as small as 6° or as large as 16.3°.

[1] https://drafts.csswg.org/css-fonts-4/#valdef-font-style-oblique-angle


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2295 using your GitHub account

Received on Friday, 9 February 2018 09:36:38 UTC