Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many missing Arabic positional glyphs #10

Closed
dscorbett opened this issue May 11, 2018 · 9 comments · Fixed by #204
Closed

Many missing Arabic positional glyphs #10

dscorbett opened this issue May 11, 2018 · 9 comments · Fixed by #204

Comments

@dscorbett
Copy link

dscorbett commented May 11, 2018

Font

NotoKufiArabic-Regular.otf
NotoNaskhArabic-Regular.otf
NotoNastaliqUrdu-Regular.otf
NotoSansArabic-Regular.otf

Where the font came from, and when

Site: https://github.com/googlefonts/noto-fonts/blob/97e5bf0bbaf85c14498696b408d60b517b0e9e70/unhinted/otf/NotoKufiArabic/NotoKufiArabic-Regular.otf
Site: https://github.com/googlefonts/noto-fonts/blob/97e5bf0bbaf85c14498696b408d60b517b0e9e70/unhinted/otf/NotoNaskhArabic/NotoNaskhArabic-Regular.otf
Site: https://github.com/googlefonts/noto-fonts/blob/97e5bf0bbaf85c14498696b408d60b517b0e9e70/unhinted/otf/NotoNastaliqUrdu/NotoNastaliqUrdu-Regular.otf
Site: https://github.com/googlefonts/noto-fonts/blob/97e5bf0bbaf85c14498696b408d60b517b0e9e70/unhinted/otf/NotoSansArabic/NotoSansArabic-Regular.otf
Date: 2022-02-08

Font version

Noto Kufi Arabic: Version 2.106
Noto Naskh Arabic: Version 2.012
Noto Nastaliq Urdu: Version 3.002
Noto Sans Arabic: Version 2.009

Issue

Some of the Arabic fonts are missing some positional forms. A few have been reported in notofonts/noto-fonts#673, #75, and #69, but it is easier to find them all at once by running a script. I encourage you to write an analogous Font Bakery check.

#!/bin/bash

if [ $# -ne 2 ]
then
    echo "Usage: $0 ArabicShaping.txt FONT_DIRECTORY"
    exit 1
fi

shaping_file="$1"
font_dir="$2"

check () {
    local cp="$1"
    local position="$2"
    local dflt="$3"
    local positional="$4"
    local font="$5"
    if [ "$dflt" = "$positional" ]
    then
        printf "$cp\t$position\t$font\n"
    fi
}

check-positions () {
    local jt="$1"
    grep "^[^#].*; $jt; " "$shaping_file" \
    | cut -f 1 -d ';' \
    | while read cp
    do
        for font in "$font_dir"/Noto{{Kufi,Naskh,Sans}Arabic,NastaliqUrdu}-Regular.?tf
        do
            local dflt="$(hb-shape --ned --no-positions --remove-default-ignorables "$font" -u $cp)"
            if [[ $dflt = *notdef* ]]
            then
                continue
            fi
            local init
            if [ $jt = L -o $jt = D ]
            then
                init="$(hb-shape --ned --no-positions --remove-default-ignorables "$font" -u "$cp 200D")"
            fi
            check $cp init "$dflt" "$init" "$(basename "$font")"
            local medi
            if [ $jt = D ]
            then
                medi="$(hb-shape --ned --no-positions --remove-default-ignorables "$font" -u "200D $cp 200D")"
            fi
            check $cp medi "$dflt" "$medi" "$(basename "$font")"
            local fina
            if [ $jt = D -o $jt = R ]
            then
                fina="$(hb-shape --ned --no-positions --remove-default-ignorables "$font" -u "200D $cp")"
            fi
            check $cp fina "$dflt" "$fina" "$(basename "$font")"
        done
    done
}

for jt in L D R
do
    check-positions $jt
done

Here are the results for the current versions.

0620	init	NotoKufiArabic-Regular.otf
0620	medi	NotoKufiArabic-Regular.otf
0620	fina	NotoKufiArabic-Regular.otf
063B	init	NotoKufiArabic-Regular.otf
063B	medi	NotoKufiArabic-Regular.otf
063B	fina	NotoKufiArabic-Regular.otf
063C	init	NotoKufiArabic-Regular.otf
063C	medi	NotoKufiArabic-Regular.otf
063C	fina	NotoKufiArabic-Regular.otf
063D	init	NotoKufiArabic-Regular.otf
063D	medi	NotoKufiArabic-Regular.otf
063D	fina	NotoKufiArabic-Regular.otf
063E	init	NotoKufiArabic-Regular.otf
063E	medi	NotoKufiArabic-Regular.otf
063E	fina	NotoKufiArabic-Regular.otf
063F	init	NotoKufiArabic-Regular.otf
063F	medi	NotoKufiArabic-Regular.otf
063F	fina	NotoKufiArabic-Regular.otf
077A	init	NotoKufiArabic-Regular.otf
077A	medi	NotoKufiArabic-Regular.otf
077B	init	NotoKufiArabic-Regular.otf
077B	medi	NotoKufiArabic-Regular.otf
08AC	fina	NotoNaskhArabic-Regular.otf
08AC	fina	NotoSansArabic-Regular.otf
08B1	fina	NotoKufiArabic-Regular.otf
08B1	fina	NotoNaskhArabic-Regular.otf
08B1	fina	NotoSansArabic-Regular.otf
@nizarsq
Copy link

nizarsq commented May 29, 2020

Tested reported issues using the NotoKufiArabic, NotoSansArabic, NotoNaskhArabic and NotoNastaliqUrdu sitting in googlefonts/noto-fonts@master/phaseIII_only/unhinted.
Reported issues fixed for NotoSansArabic and NotoNaskhArabic (font contain all positional glyphs reported). NotoKufiArabic still missng positional glyphs mentioned in this bug. Below testing results details:

0678 init and medi NotoKufiArabic (ٸلٸلٸ) reproducible init and medi
06A1 init and medi NotoKufiArabic (ڡلڡلڡ) reproducible init and medi
06A7 init and medi NotoKufiArabic (ڧلڧلڧ) reproducible init and medi
06A7 init and medi NotoSansArabic (ڧلڧلڧ) fixed
06A8 init and medi NotoKufiArabic (ڨلڨلڨ) reproducible init and medi
06A8 init and medi NotoSansArabic (ڨلڨلڨ) fixed
06BA init and medi NotoSansArabic (ںلںلں) fixed
06BA init and medi NotoKufiArabic (ںلںلں) reproducible init and med
06BB init and medi NotoKufiArabic (ڻلڻلڻ) reproducible init and med
06BD init and medi NotoKufiArabic (ڽلڽلڽ) reproducible init and med
06BD init and medi NotoSansArabic (ڽلڽلڽ) fixed
06C2 init and medi NotoKufiArabic (ۂلۂلۂ) reproducible init and med
06D1 init and medi NotoKufiArabic (ۑلۑۑ) reproducible init and med
06D1 init and medi NotoSansArabic (ۑلۑۑ) fixed
06D5 final NotoKufiArabic (لە) reproducible
06D5 final NotoSansArabic (لە) fixed
08AC final NotoSansArabic (ࢥࢬ) fixed
08AC final NotoNaskhArabic (ࢥࢬ) fixed
Screen Shot 2020-05-29 at 1 42 22 PM

@nizarsq
Copy link

nizarsq commented Feb 2, 2021

Look like missing positional glyphs added to NotoSansArabic 2.5 revised version.

@dscorbett
Copy link
Author

Why was this closed?

@simoncozens
Copy link
Contributor

Comments above suggested it was fixed. Is it not?

@dscorbett
Copy link
Author

That comment was about Noto Sans Arabic. Other fonts are still affected.

@marekjez86 marekjez86 reopened this Mar 1, 2022
@marekjez86
Copy link

@simoncozens @dscorbett : let's keep it open but I'm not sure about the priority yet (so do not worry about Nastaliq)
@dscorbett : could you add ArabicShaping.txt file(s) samples here, or this is your proprietary info?

@dscorbett
Copy link
Author

ArabicShaping.txt is a Unicode data file.

@simoncozens simoncozens transferred this issue from notofonts/noto-fonts Jun 20, 2022
@visionario2
Copy link

visionario2 commented Nov 4, 2022

So have all the fixes that were included in version 2.5 of Noto Sans Arabic on the old page been rolled into version 2.010 here?

khaledhosny added a commit to khaledhosny/noto-arabic that referenced this issue Oct 12, 2023
Fixes notofonts#10

Running the script now gives:

0886	init	NotoKufiArabic[wght].ttf
0886	fina	NotoKufiArabic[wght].ttf
088E	fina	NotoKufiArabic[wght].ttf
08B1	fina	NotoKufiArabic[wght].ttf
0886	init	NotoNaskhArabic[wght].ttf
0886	fina	NotoNaskhArabic[wght].ttf
088E	fina	NotoNaskhArabic[wght].ttf
08B1	fina	NotoNaskhArabic[wght].ttf
0886	init	NotoSansArabic[wdth,wght].ttf
0886	fina	NotoSansArabic[wdth,wght].ttf
088E	fina	NotoSansArabic[wdth,wght].ttf
08B1	fina	NotoSansArabic[wdth,wght].ttf

These code points don’t have attestations for are positional forms, so
the representation glyph is already a final form etc.
@khaledhosny
Copy link
Contributor

With #204, running the script gives:

0886	init	NotoKufiArabic[wght].ttf
0886	fina	NotoKufiArabic[wght].ttf
088E	fina	NotoKufiArabic[wght].ttf
08B1	fina	NotoKufiArabic[wght].ttf
0886	init	NotoNaskhArabic[wght].ttf
0886	fina	NotoNaskhArabic[wght].ttf
088E	fina	NotoNaskhArabic[wght].ttf
08B1	fina	NotoNaskhArabic[wght].ttf
0886	init	NotoSansArabic[wdth,wght].ttf
0886	fina	NotoSansArabic[wdth,wght].ttf
088E	fina	NotoSansArabic[wdth,wght].ttf
08B1	fina	NotoSansArabic[wdth,wght].ttf

These code points don’t have attestations for are positional forms, so the representation glyph is already a final form etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants