notofonts / noto-fonts

Noto fonts, except for CJK and emoji
http://fonts.google.com/noto
SIL Open Font License 1.1
2.45k stars 200 forks source link

Noto Nastaliq Urdu: Incorrect rendering of U+06F6 when used with a subtending mark in Urdu or Kashmiri #1620

Closed saadatm closed 2 years ago

saadatm commented 4 years ago

Font

File name: NotoNastaliqUrdu-Regular Site: https://github.com/googlefonts/noto-fonts/tree/master/unhinted/NotoNastaliqUrdu Date: 2019-11-23 Version: 2.000

Issue

In Noto Nastaliq Urdu, if the text language is set to auto, Urdu, or Kahsmiri, the digit U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX (۶) does not render correctly when following an Arabic subtending mark (U+0600..0604). It should render on top of the mark, but instead it is rendered beside the mark.

Interestingly, if the language is set to Persian or Sindhi, it does render correctly.

Digits other than U+06F6 render correctly, regardless of the language.

Some test images (produced using hb-view) below. They use U+0603 ARABIC SIGN SAFHA, but the issue can be reproduced with other subtending marks too.

Language: auto

hb-view NotoNastaliqUrdu-Regular.ttf -u "0603;06f0;0020;0020;0603;06f1;0020;0020;0603;06f2;0020;0020;0603;06f3;0020;0020;0603;06f4;0020;0020;0603;06f5;0020;0020;0603;06f6;0020;0020;0603;06f7;0020;0020;0603;06f8;0020;0020;0603;06f9;" --direction=rtl --language=auto -o marks-autolang.png

marks-autolang

Language: Urdu

hb-view NotoNastaliqUrdu-Regular.ttf -u "0603;06f0;0020;0020;0603;06f1;0020;0020;0603;06f2;0020;0020;0603;06f3;0020;0020;0603;06f4;0020;0020;0603;06f5;0020;0020;0603;06f6;0020;0020;0603;06f7;0020;0020;0603;06f8;0020;0020;0603;06f9;" --direction=rtl --language=ur -o marks-ur.png

marks-ur

Language: Kashmiri

hb-view NotoNastaliqUrdu-Regular.ttf -u "0603;06f0;0020;0020;0603;06f1;0020;0020;0603;06f2;0020;0020;0603;06f3;0020;0020;0603;06f4;0020;0020;0603;06f5;0020;0020;0603;06f6;0020;0020;0603;06f7;0020;0020;0603;06f8;0020;0020;0603;06f9;" --direction=rtl --language=ks -o marks-ks.png

marks-ks

Language: Persian

hb-view NotoNastaliqUrdu-Regular.ttf -u "0603;06f0;0020;0020;0603;06f1;0020;0020;0603;06f2;0020;0020;0603;06f3;0020;0020;0603;06f4;0020;0020;0603;06f5;0020;0020;0603;06f6;0020;0020;0603;06f7;0020;0020;0603;06f8;0020;0020;0603;06f9;" --direction=rtl --language=fa -o marks-fa.png

marks-fa

Language: Sindhi

hb-view NotoNastaliqUrdu-Regular.ttf -u "0603;06f0;0020;0020;0603;06f1;0020;0020;0603;06f2;0020;0020;0603;06f3;0020;0020;0603;06f4;0020;0020;0603;06f5;0020;0020;0603;06f6;0020;0020;0603;06f7;0020;0020;0603;06f8;0020;0020;0603;06f9;" --direction=rtl --language=sd -o marks-sd.png

marks-sd


If U+06F6 appears in a sequence of digits following a subtending mark, then the digits preceding U+06F6 render correctly, but U+06F6 and the following digits in the sequence render incorrectly (and in reverse order). Samples below (using U+0601 ARABIC SIGN SANAH):

Language: auto

hb-view NotoNastaliqUrdu-Regular.ttf -u "0601;06f1;06f9;06f6;06f5;" --direction=rtl --language=auto -o mark-year-autolang.png

mark-year-autolang

Language: Urdu

hb-view NotoNastaliqUrdu-Regular.ttf -u "0601;06f1;06f9;06f6;06f5;" --direction=rtl --language=ur -o mark-year-ur.png

mark-year-ur

Language: Kashmiri

hb-view NotoNastaliqUrdu-Regular.ttf -u "0601;06f1;06f9;06f6;06f5;" --direction=rtl --language=ks -o mark-year-ks.png

mark-year-ks

Language: Persian

hb-view NotoNastaliqUrdu-Regular.ttf -u "0601;06f1;06f9;06f6;06f5;" --direction=rtl --language=fa -o mark-year-fa.png

mark-year-fa

Language: Sindhi

hb-view NotoNastaliqUrdu-Regular.ttf -u "0601;06f1;06f9;06f6;06f5;" --direction=rtl --language=sd -o mark-year-sd.png

mark-year-sd

nizarsq commented 4 years ago

I was able to reproduce the issue with U+06f6. Tested U+0666 and it seems to be work as how U+06f6 should work (aligned on top of the mark), I have feeling this will be easy fix.

Screen Shot 2020-09-18 at 10 20 55 AM Screen Shot 2020-09-18 at 10 05 48 AM Screen Shot 2020-09-18 at 10 12 01 AM