-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added to the Universal profile. allah_ligature: "Check correct formation of allah ligature in presence of explicit tashkeel." (issue #4727)
- Loading branch information
1 parent
c0a53a7
commit a27f84d
Showing
12 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from fontTools.ttLib import TTFont | ||
|
||
from fontbakery.status import FAIL | ||
from fontbakery.codetesting import ( | ||
assert_PASS, | ||
assert_SKIP, | ||
assert_results_contain, | ||
CheckTester, | ||
TEST_FILE, | ||
) | ||
|
||
|
||
def test_check_allah_ligature(): | ||
"""Ensure correct formation of allah ligature in the presence of tashkeel marks.""" | ||
check = CheckTester("com.google.fonts/check/allah_ligature") | ||
|
||
# font has no allah ligature | ||
ttFont = TTFont(TEST_FILE("ibmplexsans-vf/IBMPlexSansVar-Roman.ttf")) | ||
assert_SKIP(check(ttFont)) | ||
|
||
# allah ligature is present but generally unused | ||
ttFont = TTFont(TEST_FILE("fustat/Fustat[wght].ttf")) | ||
assert_PASS(check(ttFont)) | ||
|
||
# classic mistake: tashkeel are placed on top of the allah ligature, colliding | ||
ttFont = TTFont(TEST_FILE("ibmplexsansarabic_v1_004/IBMPlexSansArabic-Regular.ttf")) | ||
assert_results_contain(check(ttFont), FAIL, "wrong-allah-with-tashkeel") | ||
|
||
# ligature is present and generally used, and correctly formed with tashkeel | ||
ttFont = TTFont(TEST_FILE("ibmplexsansarabic_v1_005/IBMPlexSansArabic-Regular.ttf")) | ||
assert_PASS(check(ttFont)) |