Skip to content

Commit

Permalink
Use on-device font to render keytop icons
Browse files Browse the repository at this point in the history
We made several changes around keytop icon rendering logic for 1) better
and 2) uniform look-and-feel across various devices.

 - First version showed its keytop icon as bitmap (including 9-patch).
 - Next version embed commercial font's vector image (like <path> in
   SVG) to better scaling.
 - Since 2014 (Android-L (== Material Design) year) subset font has used
   as Noto font (redistribution free) was getting ready. However there
   is no such .otf file which supports both alphabet and hiragana, we
   have to maintain our own font file having both.

Now that Noto font has been getting common across devices.  The number
of devices that have uncommon Japanese font is decreasing.  In order to
reduce maintenance cost, with this CL we start using on-device font to
render keytop icons.

BUG=
TEST=
REF_BUG=32129862
REF_CL=136007063,136444127
REF_TIME=2016-10-18T16:53:08+09:00
REF_TIME_RAW=1476777188 +0900
  • Loading branch information
matsuza committed Oct 18, 2016
1 parent 7fbd5d6 commit f5dcadf
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 17,916 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "src/third_party/breakpad"]
path = src/third_party/breakpad
url = https://chromium.googlesource.com/breakpad/breakpad
[submodule "src/third_party/fontTools"]
path = src/third_party/fontTools
url = https://github.com/googlei18n/fonttools.git
[submodule "src/third_party/gtest"]
path = src/third_party/gtest
url = https://github.com/google/googletest.git
Expand Down
33 changes: 0 additions & 33 deletions src/android/android.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
'mozc',
'guava_library',
'userfeedback/userfeedback.gyp:userfeedback_project',
'subset_font',
'resources/resources.gyp:resources_project',
'support_libraries',
],
Expand Down Expand Up @@ -474,38 +473,6 @@
},
],
},
{
'target_name': 'subset_font',
'type': 'none',
'dependencies': [
'resources/resources.gyp:copy_asis_svg',
'resources/resources.gyp:transform_template_svg',
],
'variables': {
'input_font': '<(font_dir)/Noto-Roboto2-Regular.otf',
'fonttools_path': '<(third_party_dir)/fontTools/Lib/fontTools',
},
'actions': [
{
'action_name': 'make_subset_font',
'inputs': [
'<(input_font)',
'gen_subset_font.py',
],
'outputs': [
'<(sdk_asset_dir)/subset_font.otf',
],
'action': [
'python',
'gen_subset_font.py',
'--svg_paths=<(shared_intermediate_mozc_dir)/data/images/android/svg/transformed.zip,<(shared_intermediate_mozc_dir)/data/images/android/svg/asis.zip',
'--input_font', '<(input_font)',
'--output_font', '<@(_outputs)',
'--fonttools_path', '<(fonttools_path)',
],
},
],
},
{
# The final artifact of the native layer, libmozc.so.
# Gyp generates executable artifact to <(PRODUCT_DIR),
Expand Down
140 changes: 0 additions & 140 deletions src/android/gen_subset_font.py

This file was deleted.

Loading

0 comments on commit f5dcadf

Please sign in to comment.