Browse Source

V2.138 Update (Merged pull request #254 from m4rc1e/v2.138)

Dave Crossland 7 years ago
parent
commit
ab4876f650

+ 8 - 8
requirements.txt

@@ -1,14 +1,14 @@
 booleanOperations==0.5.2
+compreffor==0.3.0
+cu2qu==1.1.1
 Cython==0.24.1
+git+https://github.com/typesupply/feaTools.git@8fc73f8ad5523cb6d9e0c8ac966eeb5dab5f7f49
+fonttools==3.13.0
 freetype-py==1.0.2
+git+https://github.com/googlei18n/nototools@8db437b21de59b2d7aba30429c60a78f3e853caa
 numpy==1.11.2rc1
+pyclipper==1.0.6
+git+https://github.com/robofab-developers/robofab.git@62229c4ea33c324e698766d3700ca9a47efcdeb6
 scipy==0.18.1
-
-git+https://github.com/fonttools/fonttools.git@0682e77370d877f8af37aae553c6d200f2078921
-git+https://github.com/googlei18n/compreffor.git@7d7ada07b24840d960c42c02c52a04de5b54ffe3
-git+https://github.com/googlei18n/cu2qu.git@d46be588f1510194cfd1bfef51ce25447d2cced6
-git+https://github.com/googlei18n/nototools@8db437b21de59b2d7aba30429c60a78f3e853caa
 git+https://github.com/googlei18n/ufo2ft.git@6184b1493bc4afc6969bd2516d02f3f616cb5484
-git+https://github.com/robofab-developers/robofab.git@62229c4ea33c324e698766d3700ca9a47efcdeb6
-git+https://github.com/typesupply/feaTools.git@8fc73f8ad5523cb6d9e0c8ac966eeb5dab5f7f49
-git+https://github.com/unified-font-object/ufoLib.git@ce2923fec01de83ca05cc6388a191afedfbd8f12
+ufoLib==2.0.0

+ 1 - 1
res/roboto.cfg

@@ -2,7 +2,7 @@
 
 builddir: out
 foundry: Google
-version: 2.136
+version: 2.138
 
 [res]
 

+ 7 - 5
scripts/lib/fontbuild/Build.py

@@ -169,10 +169,10 @@ class FontProject:
         # fewer control points and look noticeably different
         max_err = 0.002
         if self.compatible:
-            fonts_to_quadratic(fonts, max_err_em=max_err, dump_stats=True)
+            fonts_to_quadratic(fonts, max_err_em=max_err, dump_stats=True, reverse_direction=True)
         else:
             for font in fonts:
-                fonts_to_quadratic([font], max_err_em=max_err, dump_stats=True)
+                fonts_to_quadratic([font], max_err_em=max_err, dump_stats=True, reverse_direction=True)
 
         log(">> Generating TTF files")
         for font in fonts:
@@ -271,10 +271,12 @@ def saveOTF(font, destFile, glyphOrder, truetype=False):
     """Save a RoboFab font as an OTF binary using ufo2fdk."""
 
     if truetype:
-        compiler = compileTTF
+        otf = compileTTF(font, featureCompilerClass=RobotoFeatureCompiler,
+                   kernWriter=RobotoKernWriter, glyphOrder=glyphOrder,
+                   convertCubics=False,
+                   useProductionNames=False)
     else:
-        compiler = compileOTF
-    otf = compiler(font, featureCompilerClass=RobotoFeatureCompiler,
+        otf = compileOTF(font, featureCompilerClass=RobotoFeatureCompiler,
                    kernWriter=RobotoKernWriter, glyphOrder=glyphOrder,
                    useProductionNames=False)
     otf.save(destFile)

+ 1 - 1
scripts/run_android_tests.py

@@ -24,7 +24,7 @@ import run_general_tests
 
 FONTS = font_tests.load_fonts(
     ['out/android/*.ttf'],
-    expected_count=18)
+    expected_count=20)
 
 
 class TestItalicAngle(run_general_tests.TestItalicAngle):

+ 1 - 1
scripts/run_exhaustive_tests.py

@@ -21,7 +21,7 @@ from nototools.unittests import font_tests
 
 FONTS = font_tests.load_fonts(
     ['out/RobotoTTF/*.ttf', 'out/RobotoCondensedTTF/*.ttf'],
-    expected_count=18)
+    expected_count=20)
 
 
 class TestSpacingMarks(font_tests.TestSpacingMarks):

+ 1 - 1
scripts/run_general_tests.py

@@ -26,7 +26,7 @@ import roboto_data
 
 FONTS = font_tests.load_fonts(
     ['out/RobotoTTF/*.ttf', 'out/RobotoCondensedTTF/*.ttf'],
-    expected_count=18)
+    expected_count=20)
 
 UFO_MASTERS = font_tests.load_fonts(
     ['src/v2/*.ufo'],

+ 1 - 1
scripts/run_web_tests.py

@@ -33,7 +33,7 @@ class TestItalicAngle(run_general_tests.TestItalicAngle):
 
 class TestMetaInfo(font_tests.TestMetaInfo):
     loaded_fonts = FONTS
-    mark_heavier_as_bold = True
+    mark_heavier_as_bold = False
 
     # Since different font files are hinted at different times, the actual
     # outlines differ slightly. So we are keeping the version numbers as a hint.

+ 8 - 7
scripts/temporary_touchups.py

@@ -20,7 +20,7 @@ from nototools import noto_fonts
 
 import roboto_data
 
-def apply_temporary_fixes(font, is_for_cros=False):
+def apply_temporary_fixes(font, is_for_cros=False, is_for_web=False):
     """Apply some temporary fixes."""
     # Fix usWeight:
     font_name = font_data.font_name(font)
@@ -32,12 +32,13 @@ def apply_temporary_fixes(font, is_for_cros=False):
     font['OS/2'].usWeightClass = weight_number
 
     # Set bold bits for Black (macStyle bit 0, fsSelection bit 5)
-    name_records = font_data.get_name_records(font)
-    family_name = name_records[1]
-    if family_name.endswith('Black'):
-        font['head'].macStyle |= (1 << 0)
-        font['OS/2'].fsSelection |= (1 << 5)
-        font['OS/2'].fsSelection &= ~(1 << 6)
+    if is_for_web is False:
+        name_records = font_data.get_name_records(font)
+        family_name = name_records[1]
+        if family_name.endswith('Black'):
+            font['head'].macStyle |= (1 << 0)
+            font['OS/2'].fsSelection |= (1 << 5)
+            font['OS/2'].fsSelection &= ~(1 << 6)
 
 def update_version_and_revision(font):
     """Update version and revision numbers."""

+ 2 - 4
scripts/touchup_for_web.py

@@ -93,9 +93,7 @@ def apply_web_cros_common_fixes(font, unhinted, family_name):
     # hotpatch glyphs by swapping
     # https://github.com/google/roboto/issues/18
     glyf = font['glyf']
-    tmp = glyf['chi']
-    glyf['chi'] = glyf['chi.alt']
-    glyf['chi.alt'] = tmp
+    glyf['chi'], glyf['chi.alt'] = glyf['chi.alt'], glyf['chi']
 
     # make glyph orders consistent for feature copying
     # https://github.com/google/roboto/issues/71
@@ -125,7 +123,7 @@ def correct_font(source_name, unhinted_name, target_font_name, family_name):
     # apply web-specific fixes before shared, so that sub/family names are
     # correct for black weights and their bold bits will be set
     apply_web_specific_fixes(font, unhinted, family_name)
-    temporary_touchups.apply_temporary_fixes(font)
+    temporary_touchups.apply_temporary_fixes(font, is_for_web=True)
     temporary_touchups.update_version_and_revision(font)
     font.save(target_font_name)