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

Quranic annotation signs (U+06D7 U+06D6) misplaced in Noto fonts #1895

Closed nizarsq closed 3 years ago

nizarsq commented 3 years ago

Quranic annotation signs (signs of endowment) U+06D7 (pause reading is preferred) and U+06D6 (continue reading is preferred) should positioned on the last portion of the letter. Currently Noto fonts align them on the beginning of wide letters.

Issue found in:

 NotoNaskhArabic Version 2.000 https://github.com/googlefonts/noto-fonts/tree/master/unhinted/ttf/NotoNaskhArabic/NotoNaskhArabic-Regular.ttf NotoNaskhArabicUI Version 2.000 https://github.com/googlefonts/noto-fonts/tree/master/unhinted/ttf/NotoNaskhArabicUI/NotoNaskhArabicUI-Regular.ttf NotoSansArabicUI Version 2.02 
https://github.com/googlefonts/noto-fonts/tree/master/unhinted/ttf/NotoSansArabicUI/NotoSansArabicUI-Regular.ttf NotoSansArabic Version 2.02 
https://github.com/googlefonts/noto-fonts/tree/master/unhinted/ttf/NotoSansArabic/NotoSansArabic-Regular.ttf NotoKufiArabic Version 2.101 
https://github.com/googlefonts/noto-fonts/tree/master/unhinted/ttf/NotoKufiArabic/NotoKufiArabic-Regular.ttf

Characters data used in the test: وَٱلۡأَرۡضِۖ ٱلنَّاسِۖ ٱلۡأَرۡضِۗ أَوْلَى سسسۗ لللۗ

Screen Shot 2020-10-12 at 11 54 01 AM

screen-3 screen-1

Here more screenshots: https://ar.wikipedia.org/wiki/%D8%B9%D9%84%D8%A7%D9%85%D8%A7%D8%AA_%D8%A7%D9%84%D8%B6%D8%A8%D8%B7_%D9%88%D8%A7%D9%84%D9%88%D9%82%D9%81_%D9%81%D9%8A_%D8%A7%D9%84%D9%85%D8%B5%D8%AD%D9%81#%D8%B9%D9%84%D8%A7%D9%85%D8%A7%D8%AA_%D8%A7%D9%84%D9%88%D9%82%D9%81_%D9%88%D8%A7%D9%84%D9%85%D8%AF_%D9%81%D9%8A_%D8%A7%D9%84%D9%85%D8%B5%D8%AD%D9%81_%D8%A7%D9%84%D8%B4%D8%B1%D9%8A%D9%81

atuvhnynv145 commented 3 years ago
截圖 2020-10-12 20 57 05
dscorbett commented 3 years ago

This affects all the waqf signs, not just U+06D6 and U+06D7.

Another positioning quirk of these signs is that they appear at a certain minimum height. They can be raised to make room for other marks but not lowered below that height. See “AlQalam for typesetting traditional Arabic texts”, section 5.1. For example, U+06D6 should be at the same height in both <U+0631, U+06D6> and <U+0631, U+064E, U+06D6>. رۖرَۖ

For the UI fonts with their restricted line height, this minimum height might be too high. I have found an alternative positioning strategy: in surah 2, ayah 26 of this Quran there are examples of U+0615 ARABIC SMALL HIGH TAH, U+06DA ARABIC SMALL HIGH JEEM, and U+06D8 ARABIC SMALL HIGH MEEM INITIAL FORM. They are rendered as spacing marks to the left of their bases and are only somewhat raised above the baseline. Something like this (at least the use of spacing marks) may be appropriate for the UI fonts.

marekjez86 commented 3 years ago

@atuvhnynv145 : what does your screen shot mean? what is the issue that you'd like to report?

nizarsq commented 3 years ago

@dscorbett Thanks for your comment. I didn't see issues with other waqf signs in terms of sitting on the beginning of the letter . At this stage I'm trying to focus on higher priority Arabic issues (Issues affect daily users). If you have anything that I didn't catch please feel free to update the bug or file other bugs.

06D6 " ۖ " appears in 1294 verse(s) in Quran ---> Misplaced 06D7 " ۗ " appears in 517 verse(s) in Quran ---> Misplaced 06DA " ۚ " appears in 5617 verse(s) in Quran ---> Looks good دَرَجَاتٍ ۚ وَآتَيْنَا, كَفَرَ ۚ وَلَوْ, وَالْعُدْوَانِ ۚ وَاتَّقُوا, بَعْضٍ ۚ وَمَن 06DC " ۜ " appears in 5 verse(s) in Quran ---> Looks good لَّهُمْ مَنْ ۜ بَلْ ۜ رَانَ 06D8 " ۘ " appears in 22 verse(s) in Quran ---> Looks good مَثَلًا ۘ يُضِلُّ, قَوْلِهِمْ ۘ تَشَابَهَتْ, الَّذِينَ آمَنُوا ۘ وَالَّذِينَ, بَعْضٍ ۘ مِّنْهُم 06DB " ۛ " appears in 6 verse(s) in Quran ---> Looks good إِلَى التَّهْلُكَةِ ۛ وَأَحْسِنُوا ۛ , لَا رَيْبَ ۛ فِيهِ ۛ هُدًى, عَلَيْهِمْ ۛ أَرْبَعِينَ سَنَةً ۛ 06D9 " ۙ " appears in 64 verse(s) in Quran ---> Looks good الْكِتَابِ ۙ أُولَـٰئِكَ قَلِيلًا ۙ أُولَـٰئِكَ

Screen Shot 2020-10-13 at 9 28 48 PM
dscorbett commented 3 years ago

It only looks good in your test file because a space comes between the letter and the annotation sign. If you remove the space, the problem appears. دَرَجَاتٍۚ

fawazahmed0 commented 3 years ago

Font Details: NotoNaskhArabic Version 2.000 https://github.com/googlefonts/noto-fonts/tree/master/unhinted/ttf/NotoNaskhArabic/NotoNaskhArabic-Regular.ttf NotoSansArabic Version 2.002 
https://github.com/googlefonts/noto-fonts/tree/master/unhinted/ttf/NotoSansArabic/NotoSansArabic-Regular.ttf NotoKufiArabic Version 2.101 
https://github.com/googlefonts/noto-fonts/tree/master/unhinted/ttf/NotoKufiArabic/NotoKufiArabic-Regular.ttf

Few examples where two quranic annotations are together:

Character Data: وَمَا كَانَ لَنَا عَلَيۡكُم مِّن سُلۡطَٰنِۭۖ بَلۡ كُنتُمۡ قَوۡم ࣰ ا طَٰغِينَ

Noto Sans Arabic: image

Noto Naskh: image

Noto Kufi: image

Character Data 2: فَإِذَا مَسَّ ٱلۡإِنسَٰنَ ضُرّ ࣱ دَعَانَا ثُمَّ إِذَا خَوَّلۡنَٰهُ نِعۡمَة ࣰ مِّنَّا قَالَ إِنَّمَآ أُوتِيتُهُۥ عَلَىٰ عِلۡمِۭۚ بَلۡ هِيَ فِتۡنَة ࣱ وَلَٰكِنَّ أَكۡثَرَهُمۡ لَا يَعۡلَمُونَ

Noto Sans Arabic: image

Noto Naskh: image

Noto Kufi: image

Character Data 3: ٱلۡعَزۡمِ مِنَ ٱلرُّسُلِ وَلَا تَسۡتَعۡجِل لَّهُمۡۚ كَأَنَّهُمۡ يَوۡمَ يَرَوۡنَ مَا يُوعَدُونَ لَمۡ يَلۡبَثُوٓاْ إِلَّا سَاعَة ࣰ مِّن نَّهَارِۭۚ بَلَٰغ ࣱ ۚ فَهَلۡ يُهۡلَكُ إِلَّا ٱلۡقَوۡمُ ٱلۡفَٰسِقُونَ

Noto Sans Arabic: image

Noto Naskh: image

Noto Kufi: image

There are many more examples, a regex search [\u0610-\u061f\u06d6-\u06e0\u06e2\u06ed\u08d3-\u08ff]{2,} will bring many more of these depending on quran data you have.

You might want to consider adding support for quranic annotations in Arabic Extended-A Block to add support for different quranic variants.

Example from Quran Naskh/IndoPak Variant:

Character Data: صِرَاطَ الَّذِيۡنَ اَنۡعَمۡتَ عَلَيۡهِمۡ ࣢ۙ غَيۡرِ الۡمَغۡضُوۡبِ عَلَيۡهِمۡ وَلَا الضَّآلِّيۡنَ ࣖ‏

Noto Sans Arabic: image

Noto Naskh: image

Noto Kufi: image

Many more quranic annotations will be added to new Arabic Extended-B Block in coming Unicode v14 to add support for qaloon, Warsh etc variants of quran. See this and this for more info.

Thanks

nizarsq commented 3 years ago

I believe this looks much better

Screen Shot 2020-11-26 at 8 33 41 PM
nizarsq commented 3 years ago

Issue fixed