diff options
author | Roozbeh Pournader <roozbeh@google.com> | 2015-05-19 18:25:51 -0700 |
---|---|---|
committer | Roozbeh Pournader <roozbeh@google.com> | 2015-05-19 18:25:51 -0700 |
commit | 7f4a0fe2d3148c2b778aea2b0b22336b6ad40b3a (patch) | |
tree | d8f522b84df6ab88c631c6ad0e8e31cacf13dc7d | |
parent | 40de23b7170ef01d2521881d7c8ff307c64fbdc6 (diff) | |
parent | 204daa733fab8f7cc22cc7b707dcbfe70bbfd3bc (diff) |
Merge pull request #36 from google/android
Add make target to build Android fonts from hinted fonts.
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | res/buildnumber.txt | 2 | ||||
-rw-r--r-- | res/roboto.cfg | 2 | ||||
-rwxr-xr-x | scripts/touchup_for_android.py | 12 |
4 files changed, 24 insertions, 8 deletions
@@ -40,6 +40,22 @@ android: rm $$touched $$subsetted; \ done +# TODO: remove this build target once we are comfortable with the quality of +# the new toolchain +android-from-hinted: + mkdir -p out/android + for source in hinted/*.ttf; do \ + unhinted=$$(mktemp); \ + touched=$$(mktemp); \ + subsetted=$$(mktemp); \ + final=out/android/$$(basename $$source); \ + python $$HOME/noto/nototools/drop_hints.py $$source $$unhinted && \ + python scripts/touchup_for_android.py $$unhinted $$touched && \ + python $$HOME/noto/nototools/subset.py $$touched $$subsetted && \ + python scripts/force_yminmax.py $$subsetted $$final && \ + rm $$touched $$subsetted; \ + done + web: mkdir -p out/web for source in hinted/*.ttf; do \ diff --git a/res/buildnumber.txt b/res/buildnumber.txt index 44cc29a..94832fd 100644 --- a/res/buildnumber.txt +++ b/res/buildnumber.txt @@ -1 +1 @@ -01287
\ No newline at end of file +01288
\ No newline at end of file diff --git a/res/roboto.cfg b/res/roboto.cfg index 81c4a17..0b3ce60 100644 --- a/res/roboto.cfg +++ b/res/roboto.cfg @@ -2,7 +2,7 @@ builddir: out foundry: Google -version: 2.001047 +version: 2.01288 buildnumberfile: res/buildnumber.txt [res] diff --git a/scripts/touchup_for_android.py b/scripts/touchup_for_android.py index bd21fc5..e0f81cd 100755 --- a/scripts/touchup_for_android.py +++ b/scripts/touchup_for_android.py @@ -154,7 +154,7 @@ def apply_temporary_fixes(font): path.dirname(__file__), os.pardir, 'res', 'buildnumber.txt') build_number = open(build_number_txt).read().strip() - version_record = 'Version 2.0%s; %d' % (build_number, date.today().year) + version_record = 'Version 2.%s; %d' % (build_number, date.today().year) for record in font['name'].names: if record.nameID == 5: @@ -175,13 +175,13 @@ def apply_android_specific_fixes(font): hhea.descent = -500 hhea.lineGap = 0 - # Remove tab, combining keycap, the arrows, and unassigned characters - # from the cmap table - # https://code.google.com/a/google.com/p/roboto/issues/detail?id=51 + # Remove combining keycap and the arrows from the cmap table: # https://code.google.com/a/google.com/p/roboto/issues/detail?id=52 - # https://code.google.com/a/google.com/p/roboto/issues/detail?id=53 font_data.delete_from_cmap(font, [ - 0x0009, 0x20E3, 0x2072, 0x2073, 0x208F, 0x2191, 0x2193]) + 0x20E3, # COMBINING ENCLOSING KEYCAP + 0x2191, # UPWARDS ARROW + 0x2193, # DOWNWARDS ARROW + ]) # Drop tables not useful on Android for table in ['LTSH', 'hdmx', 'VDMX', 'gasp']: |