Bug 257743

Summary: It should be possible to slant glyphs to the left for italics/oblique for RTL script users
Product: WebKit Reporter: r12a <ishida>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ishida, karlcow, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: macOS 12   
Description Flags
Left-leaning N'Ko text.
Left leaning oblique text in an Arabic newspaper. none

Description r12a 2023-06-06 04:14:53 PDT
Created attachment 466600 [details]
Left-leaning N'Ko text.

This issue is applicable to Arabic, Persian, Hebrew, & N'Ko, and more scripts & languages.

Some right-to-left writing systems italicise by sloping the letters to the left (ie. in the reading direction).

Attached is an example from the N'Ko Kigelia font. The creators of the Kigelia font conducted research with the users and standardisation body for the N'Ko script to establish their preference, and this was the requested default styling for N'Ko italics.

Some Hebrew authors also prefer to slope in the direction of reading, although this tends to be subject to author preference.

Also attached is a photo of an Arabic newspaper letterhead. See the oblique text in the middle line.

In the absence of an italic font, one should be able to produce oblique text that leans like this using font-style:oblique -14deg;, but this doesn't work for WebKit and Blink browsers (but it does work on Gecko).

Test: https://github.com/w3c/character_phrase_tests/issues/56

Please enable negative settings for font-style, so that these international users can create text on the web as they do elsewhere.

[This gap is being tracked at https://github.com/w3c/afrlreq/issues/17]
Comment 1 r12a 2023-06-06 04:15:38 PDT
Created attachment 466601 [details]
Left leaning oblique text in an Arabic newspaper.
Comment 2 Radar WebKit Bug Importer 2023-06-13 04:15:17 PDT
Comment 3 Karl Dubost 2023-06-15 04:20:03 PDT
Hi Richard,

are there WPT tests planned for this?
Comment 4 r12a 2023-06-15 05:23:24 PDT
hi Karl.  Unfortunately, i don't have bandwidth enough to create WPT tests these days.  Anyone is welcome to adapt the test i point to, if that helps.
Comment 5 r12a 2023-07-26 20:50:24 PDT
Note that a further wrinkle has appeared here. The CSS spec suggests that if an italic font face is available, the font-style:oblique xxdeg; directive should be ignored in favour of the font.  This, however, is not appropriate when it turns oblique letterforms into italic ones, and converts left leaning to right leaning. See the discussion at https://github.com/w3c/csswg-drafts/issues/8914