Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
V2.138 Update (Merged pull request #254 from m4rc1e/v2.138)
Browse files Browse the repository at this point in the history
  • Loading branch information
davelab6 authored May 25, 2017
2 parents 4a1d026 + a361418 commit ab4876f
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 29 deletions.
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion res/roboto.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

builddir: out
foundry: Google
version: 2.136
version: 2.138

[res]

Expand Down
12 changes: 7 additions & 5 deletions scripts/lib/fontbuild/Build.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ def generateTTFs(self):
# 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:
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion scripts/run_android_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

FONTS = font_tests.load_fonts(
['out/android/*.ttf'],
expected_count=18)
expected_count=20)


class TestItalicAngle(run_general_tests.TestItalicAngle):
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_exhaustive_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

FONTS = font_tests.load_fonts(
['out/RobotoTTF/*.ttf', 'out/RobotoCondensedTTF/*.ttf'],
expected_count=18)
expected_count=20)


class TestSpacingMarks(font_tests.TestSpacingMarks):
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_general_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

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'],
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_web_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 8 additions & 7 deletions scripts/temporary_touchups.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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)
Expand All @@ -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."""
Expand Down
6 changes: 2 additions & 4 deletions scripts/touchup_for_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit ab4876f

Please sign in to comment.