Bug 255972

Summary: [Harfbuzz] Some Arabic fonts are not being shaped correctly
Product: WebKit Reporter: Saadat Mateen <saadat.mateen>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, mcatanzaro, philn, webkit-bug-importer
Priority: P2    
Version: Other   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Incorrect rendering of Noto Nastaliq Urdu in Epiphany 44.1
none
Correct rendering of Noto Nastaliq Urdu in Firefox 112.0.1
none
Incorrect rendering of Mada in Epiphany 44.1
none
Correct rendering of Mada in Firefox 112.0.1
none
Incorrect rendering of Noto Sans Arabic in Epiphany 44.1
none
Correct rendering of Noto Sans Arabic in Firefox 112.0.1 none

Description Saadat Mateen 2023-04-25 22:58:03 PDT
# Platform details

Epiphany version: 44.1
WebKitGTK: 2.40.1
GStreamer: 1.22.2
Distributor: Fedora Linux 38 (Workstation Edition)

# Issue

Text set in some Arabic fonts is not being shaped correctly. Depending on the font, following issues are occurring:

1. Vertical positioning of glyphs is incorrect.
   URL: https://fonts.google.com/noto/specimen/Noto+Nastaliq+Urdu

2. All marks (dots/diacritics) are in wrong positions, and separate lines of a paragraph are jumbled.
   URL: https://fonts.google.com/specimen/Mada

3. Some diacritics are incorrectly positioned.
   URL: https://fonts.google.com/noto/specimen/Noto+Sans+Arabic

Examples of various other Arabic fonts with incorrect shaping may also be seen at https://fonts.google.com/?subset=arabic&noto.script=Arab
Comment 1 Saadat Mateen 2023-04-25 22:59:14 PDT
Created attachment 466085 [details]
Incorrect rendering of Noto Nastaliq Urdu in Epiphany 44.1
Comment 2 Saadat Mateen 2023-04-25 23:00:11 PDT
Created attachment 466086 [details]
Correct rendering of Noto Nastaliq Urdu in Firefox 112.0.1
Comment 3 Saadat Mateen 2023-04-25 23:01:09 PDT
Created attachment 466087 [details]
Incorrect rendering of Mada in Epiphany 44.1
Comment 4 Saadat Mateen 2023-04-25 23:01:29 PDT
Created attachment 466088 [details]
Correct rendering of Mada in Firefox 112.0.1
Comment 5 Saadat Mateen 2023-04-25 23:02:10 PDT
Created attachment 466089 [details]
Incorrect rendering of Noto Sans Arabic in Epiphany 44.1

Some incorrect positioning instances marked with a red circle.
Comment 6 Saadat Mateen 2023-04-25 23:02:36 PDT
Created attachment 466090 [details]
Correct rendering of Noto Sans Arabic in Firefox 112.0.1