Bug 200369 - Slanted text in variable fonts is not rendered correctly if font-style descriptor defines an upper angle that is less than 20deg
Summary: Slanted text in variable fonts is not rendered correctly if font-style descri...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-01 16:46 PDT by Šime Vidas
Modified: 2019-08-02 12:51 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Šime Vidas 2019-08-01 16:46:46 PDT
Steps to reproduce:

1. Open https://jsbin.com/dabetaq/edit?css,output

Expected results:

All three boxes should have the same, correct text slant.

Actual results:

In Safari, the slant is incorrect for the second and third box.

Explanation:

It appears that font-style: oblique only renders the correct slant if the upper angle in the font-style descriptor is at least 20deg in Safari. But the variable font has a 'slnt' axis range of 0 to 10*, which translates to the CSS range 0dge 10deg.

*You can check the font file’s 'slnt' range on wakamaifondue.com.

If you change this range to 0deg 20deg, Safari renders the slant correctly. Safari should let authors specify the variable font’s actual slant range. Currently, authors have to use 20deg as some sort of magic number to get correct rendering in Safari.

Note: I’m not an expert on variable fonts, but the range 0deg 10deg works in Chrome and Safari, so this seems to be a bug in Safari.
Comment 1 Radar WebKit Bug Importer 2019-08-01 22:43:42 PDT
<rdar://problem/53849550>