Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: build/linux/install-chromeos-fonts.py

Issue 2680913005: Add fontconfig instructions to install-chromeos-fonts.py. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 with open(stamp, 'w') as s: 76 with open(stamp, 'w') as s:
77 s.write('\n'.join(URLS)) 77 s.write('\n'.join(URLS))
78 78
79 for base, dirs, files in os.walk(dest_dir): 79 for base, dirs, files in os.walk(dest_dir):
80 for dir in dirs: 80 for dir in dirs:
81 os.chmod(os.path.join(base, dir), 0755) 81 os.chmod(os.path.join(base, dir), 0755)
82 for file in files: 82 for file in files:
83 os.chmod(os.path.join(base, file), 0644) 83 os.chmod(os.path.join(base, file), 0644)
84 84
85 print """\
86
87 Chrome OS font rendering settings are specified using Fontconfig. If your
88 system's configuration doesn't match Chrome OS's (which vary for different
89 devices), fonts may be rendered with different subpixel rendering, subpixel
90 positioning, or hinting settings. This may affect font metrics.
91
92 Chrome OS's settings are stored in the media-libs/fontconfig package, which is
93 at src/third_party/chromiumos-overlay/media-libs/fontconfig in a Chrome OS
94 checkout. You can configure your system to match Chrome OS's defaults by
95 creating or editing a ~/.fonts.conf file:
96
97 <?xml version="1.0"?>
98 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
99 <fontconfig>
100 <match target="font">
101 <edit name="antialias" mode="assign"><bool>true</bool></edit>
102 <edit name="autohint" mode="assign"><bool>true</bool></edit>
103 <edit name="hinting" mode="assign"><bool>true</bool></edit>
104 <edit name="hintstyle" mode="assign"><const>hintslight</const></edit>
105 <edit name="rgba" mode="assign"><const>rgb</const></edit>
106 </match>
107 </fontconfig>
108
109 To load additional per-font configs (and assuming you have Chrome OS checked
110 out), add the following immediately before the "</fontconfig>" line:
111
112 <include ignore_missing="yes">/path/to/src/third_party/chromiumos-overlay/medi a-libs/fontconfig/files/local.conf</include>
113 """
114
85 return 0 115 return 0
86 116
87 if __name__ == '__main__': 117 if __name__ == '__main__':
88 sys.exit(main(sys.argv[1:])) 118 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698