Browse Source

Merge pull request #193 from google/fea-fix

Ligature fix
James Godfrey-Kittle 8 years ago
parent
commit
f61b7a2a5d

+ 1 - 1
scripts/run_android_tests.py

@@ -95,7 +95,7 @@ class TestCharacterCoverage(font_tests.TestCharacterCoverage):
         ) - include  # don't exclude legacy PUA
 
 
-class TestLigatures(font_tests.TestLigatures):
+class TestLigatures(run_general_tests.TestLigatures):
     loaded_fonts = FONTS
 
 

+ 8 - 6
scripts/run_general_tests.py

@@ -127,14 +127,16 @@ class TestCharacterCoverage(font_tests.TestCharacterCoverage):
 class TestLigatures(font_tests.TestLigatures):
     loaded_fonts = FONTS
     active = (
-        (None, ('ffi', 'ffl')),
+        (None, ('fi', 'fl', 'ffi', 'ffl')),
+        ('--language=FRA', ('fi', 'fl', 'ffi', 'ffl')),
+        ('--language=TRK', ('fl', 'ffl')),
         ('--features=dlig', ('ff', 'st', u'ſt')),
     )
-    #TODO uncomment when working
-    #inactive = (
-    #    ('--language=TRK', ('fi', 'ffi')),
-    #)
-    inactive = ()
+    inactive = (
+        (None, ('ff', 'st', u'ſt')),
+        ('--language=TRK', ('fi', 'ffi')),
+        ('--script=arab', ('fi', 'fl', 'ffi', 'ffl')),
+    )
 
 
 class TestFeatures(font_tests.TestFeatures):

+ 1 - 1
scripts/run_web_tests.py

@@ -105,7 +105,7 @@ class TestVerticalMetrics(font_tests.TestVerticalMetrics):
     expected_os2_usWinAscent = 1946
 
 
-class TestLigatures(font_tests.TestLigatures):
+class TestLigatures(run_general_tests.TestLigatures):
     loaded_fonts = FONTS
 
 

+ 21 - 2
src/v2/Roboto_Regular.ufo/features.fea

@@ -3,7 +3,7 @@ languagesystem latn dflt;
 languagesystem latn MOL;
 languagesystem latn ROM;
 languagesystem latn FRA;
-languagesystem latn TUR;
+languagesystem latn TRK;
 languagesystem latn AZE;
 languagesystem latn CRT;
 languagesystem latn NAV;
@@ -939,7 +939,26 @@ feature liga {
     sub f l by f_l;
   } liga02;
 
-  language TUR  exclude_dflt;
+  # include all ligatures for these languages
+  language FRA;  # French
+  lookup liga01;
+  lookup liga02;
+  language MOL;  # Moldavian
+  lookup liga01;
+  lookup liga02;
+  language NAV;  # Navajo
+  lookup liga01;
+  lookup liga02;
+  language ROM;  # Romanian
+  lookup liga01;
+  lookup liga02;
+
+  # don't include fi/ffi ligatures for these languages
+  language AZE  exclude_dflt;  # Azerbaijani
+  lookup liga02;
+  language CRT  exclude_dflt;  # Crimean Tatar
+  lookup liga02;
+  language TRK  exclude_dflt;  # Turkish
   lookup liga02;
 
 } liga;