diff options
author | Seigo Nonaka <nona@google.com> | 2018-01-18 17:24:31 -0800 |
---|---|---|
committer | Seigo Nonaka <nona@google.com> | 2018-01-18 17:24:31 -0800 |
commit | 1403ff2b0b5f23b11ce427f54c16d3ebd62100eb (patch) | |
tree | c6bbf4201c1336faa512c59fd8f40d21f121533f | |
parent | 633792e2d3fd0d09eebc4294119dcc9b1b1de970 (diff) |
Ignore missing font in fontchain_linter.py
It is totally valid if the font is missing even if the font is listed in
fonts.xml. Android Watch has less fonts and OEM vendor may reduce the
font files.
Bug: 72159040
Test: m fontchain_lint
Change-Id: I22bdf7bfeb6d80a2a338ebf7536c8eaf193b03c5
-rwxr-xr-x | tools/fonts/fontchain_linter.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/fonts/fontchain_linter.py b/tools/fonts/fontchain_linter.py index 15d39fdfd6ea..ec40a2229c33 100755 --- a/tools/fonts/fontchain_linter.py +++ b/tools/fonts/fontchain_linter.py @@ -270,6 +270,9 @@ def parse_fonts_xml(fonts_xml_path): if index: index = int(index) + if not path.exists(path.join(_fonts_dir, font_file)): + continue # Missing font is a valid case. Just ignore the missing font files. + record = FontRecord( name, frozenset(scripts), |