TypeTogether / Playwrite

Sensei primary repository.
SIL Open Font License 1.1
93 stars 3 forks source link

Slant value should be negative #18

Closed vv-monsalve closed 4 months ago

vv-monsalve commented 10 months ago

According to the spec:

Note that the scale for the Slant axis is interpreted as the angle of slant in counter-clockwise degrees from upright. This means that a typical, right-leaning oblique design will have a negative slant value.

There is a Fail reported related to this for the VF at commit ea9393d

🔥 FAIL: Checking direction of slnt axis angles (com.google.fonts/check/slant_direction)
> >The 'slnt' axis values are defined as negative values for a clockwise (right) lean, and positive values for counter-clockwise lean. This is counter-intuitive for many designers who are used to think of a positive slant as a lean to the right. > >This check ensures that the slant axis direction is consistent with the specs. > >https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_slnt > * 🔥 **FAIL** The right-leaning glyphs have a positive 'slnt' axis value, which is likely a mistake. It needs to be negative to lean rightwards. [code: positive-value-for-clockwise-lean]
josescaglione commented 9 months ago

@vv-monsalve this error is no longer triggered. Kindly close the issue

vv-monsalve commented 9 months ago

@josescaglione as we discussed during the meeting, after the visual comprobations I'll go back to the FB checks and report back or close the issues regarding them.

vv-monsalve commented 9 months ago

Confirmed

vv-monsalve commented 7 months ago

Hi @casasin the source file still has a positive slant axis value slnt = 18, which means a backward slant. Since the slant axis is interpreted counter-clockwise, for a typical right-leaning font it is expected a negative slant value, so it should be slnt = -18. This is important when we slice the VFs and compute the post.italicAngle.

Please change that value at the source level.

vv-monsalve commented 5 months ago

This value is still positive in the source file in lang-build branch at commit 658f99f.

@simoncozens Is this what is preventing builder2 from creating the Italic fonts?

simoncozens commented 5 months ago

The italic fonts are being built correctly, but I agree that the slant axis should be changed in the sources.

The specification of the slnt axis says that

Values can be interpreted as the angle, in counter-clockwise degrees

Glyphs is a bit funny here - it interprets italic angles in static fonts (e.g. post.italicAngle) as clockwise claiming this is "more intuitive", and then flips the sign on export. But it isn't what the spec says, and it means when people use the same values for their slnt axes they produce fonts that are not compliant with the spec.

casasin commented 5 months ago

This was already done. Close? : )

vv-monsalve commented 4 months ago

Confirmed this is ok on the source file a commit cc1f569. Closing it now :)