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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/linux/install-chromeos-fonts.py
diff --git a/build/linux/install-chromeos-fonts.py b/build/linux/install-chromeos-fonts.py
index 61f7332a1ec1eb30aa30a15c2650076686759222..b912084790dde9ab719551137a0e10c7ee75c0c6 100755
--- a/build/linux/install-chromeos-fonts.py
+++ b/build/linux/install-chromeos-fonts.py
@@ -82,6 +82,36 @@ def main(args):
for file in files:
os.chmod(os.path.join(base, file), 0644)
+ print """\
+
+Chrome OS font rendering settings are specified using Fontconfig. If your
+system's configuration doesn't match Chrome OS's (which vary for different
+devices), fonts may be rendered with different subpixel rendering, subpixel
+positioning, or hinting settings. This may affect font metrics.
+
+Chrome OS's settings are stored in the media-libs/fontconfig package, which is
+at src/third_party/chromiumos-overlay/media-libs/fontconfig in a Chrome OS
+checkout. You can configure your system to match Chrome OS's defaults by
+creating or editing a ~/.fonts.conf file:
+
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+ <match target="font">
+ <edit name="antialias" mode="assign"><bool>true</bool></edit>
+ <edit name="autohint" mode="assign"><bool>true</bool></edit>
+ <edit name="hinting" mode="assign"><bool>true</bool></edit>
+ <edit name="hintstyle" mode="assign"><const>hintslight</const></edit>
+ <edit name="rgba" mode="assign"><const>rgb</const></edit>
+ </match>
+</fontconfig>
+
+To load additional per-font configs (and assuming you have Chrome OS checked
+out), add the following immediately before the "</fontconfig>" line:
+
+ <include ignore_missing="yes">/path/to/src/third_party/chromiumos-overlay/media-libs/fontconfig/files/local.conf</include>
+"""
+
return 0
if __name__ == '__main__':
« 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