| OLD | NEW | 
|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python | 
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be | 
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. | 
| 5 | 5 | 
| 6 # Script to install the Chrome OS fonts on Linux. | 6 # Script to install the Chrome OS fonts on Linux. | 
| 7 # This script can be run manually (as root), but is also run as part | 7 # This script can be run manually (as root), but is also run as part | 
| 8 # install-build-deps.sh. | 8 # install-build-deps.sh. | 
| 9 | 9 | 
| 10 import os | 10 import os | 
| 11 import shutil | 11 import shutil | 
| 12 import subprocess | 12 import subprocess | 
| 13 import sys | 13 import sys | 
| 14 | 14 | 
| 15 URL_TEMPLATE = ('https://commondatastorage.googleapis.com/chromeos-localmirror/' | 15 URL_TEMPLATE = ('https://commondatastorage.googleapis.com/chromeos-localmirror/' | 
| 16                 'distfiles/%(name)s-%(version)s.tar.bz2') | 16                 'distfiles/%(name)s-%(version)s.tar.bz2') | 
| 17 | 17 | 
| 18 # Taken from the media-fonts/<name> ebuilds in chromiumos-overlay. | 18 # Taken from the media-fonts/<name> ebuilds in chromiumos-overlay. | 
|  | 19 # noto-cjk used to be here, but is removed because fc-cache takes too long | 
|  | 20 # regenerating the fontconfig cache (See crbug.com/697954.) | 
|  | 21 # TODO(jshin): Add it back when the above issue can be avoided. | 
| 19 SOURCES = [ | 22 SOURCES = [ | 
| 20   { | 23   { | 
| 21     'name': 'notofonts', | 24     'name': 'notofonts', | 
| 22     'version': '20161129' | 25     'version': '20161129' | 
| 23   }, { | 26   }, { | 
| 24     'name': 'noto-cjk', |  | 
| 25     'version': '20150910' |  | 
| 26   }, { |  | 
| 27     'name': 'robotofonts', | 27     'name': 'robotofonts', | 
| 28     'version': '2.132' | 28     'version': '2.132' | 
| 29   } | 29   } | 
| 30 ] | 30 ] | 
| 31 | 31 | 
| 32 URLS = sorted([URL_TEMPLATE % d for d in SOURCES]) | 32 URLS = sorted([URL_TEMPLATE % d for d in SOURCES]) | 
| 33 FONTS_DIR = '/usr/local/share/fonts' | 33 FONTS_DIR = '/usr/local/share/fonts' | 
| 34 | 34 | 
| 35 def main(args): | 35 def main(args): | 
| 36   if not sys.platform.startswith('linux'): | 36   if not sys.platform.startswith('linux'): | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 109 To load additional per-font configs (and assuming you have Chrome OS checked | 109 To load additional per-font configs (and assuming you have Chrome OS checked | 
| 110 out), add the following immediately before the "</fontconfig>" line: | 110 out), add the following immediately before the "</fontconfig>" line: | 
| 111 | 111 | 
| 112   <include ignore_missing="yes">/path/to/src/third_party/chromiumos-overlay/medi
     a-libs/fontconfig/files/local.conf</include> | 112   <include ignore_missing="yes">/path/to/src/third_party/chromiumos-overlay/medi
     a-libs/fontconfig/files/local.conf</include> | 
| 113 """ | 113 """ | 
| 114 | 114 | 
| 115   return 0 | 115   return 0 | 
| 116 | 116 | 
| 117 if __name__ == '__main__': | 117 if __name__ == '__main__': | 
| 118   sys.exit(main(sys.argv[1:])) | 118   sys.exit(main(sys.argv[1:])) | 
| OLD | NEW | 
|---|