| Chromium OS has different needs for fontconfig than is typical. Our list of |
| fonts is the same for every user (there is only one linux user anyway). |
| Also, the list can never change. |
| |
| We explicitly list the font directories to be searched for fonts, which come |
| from the read-only partition. This prevents potentially malicious fonts from |
| being installed in writable directories such as ~/.fonts that are not subject |
| to verification. Explicitly listing every font directory allows us to specify |
| exactly which fonts we want in the font cache. This is necessary so that we |
| can generate the font cache during build_packages and produce a prebuilt binary |
| with all the cache files. This speeds up build_image for ARM boards by up to |
| 9 minutes (crbug.com/205424). The font directories are listed in the local.conf |
| file to make it easier to add or remove fonts in the future. Finally, by |
| excluding FC_FONTPATH we also make sure that nonexistent directories added in |
| ebuilds (/usr/local/share/fonts) are not searched. |
| |
| In addition, we remove the rescan directive because the font list won't |
| change. |
| |
| --- fontconfig-2.11.1.old/fonts.conf.in 2017-01-04 15:26:25.654050277 -0800 |
| +++ fontconfig-2.11.1/fonts.conf.in 2017-01-04 15:30:06.321853736 -0800 |
| @@ -21,14 +21,6 @@ |
| Keith Packard |
| --> |
| |
| -<!-- Font directory list --> |
| - |
| - <dir>@FC_DEFAULT_FONTS@</dir> |
| - @FC_FONTPATH@ |
| - <dir prefix="xdg">fonts</dir> |
| - <!-- the following element will be removed in the future --> |
| - <dir>~/.fonts</dir> |
| - |
| <!-- |
| Accept deprecated 'mono' alias, replacing it with 'monospace' |
| --> |
| @@ -73,9 +65,6 @@ |
| <!-- Font cache directory list --> |
| |
| <cachedir>@FC_CACHEDIR@</cachedir> |
| - <cachedir prefix="xdg">fontconfig</cachedir> |
| - <!-- the following element will be removed in the future --> |
| - <cachedir>~/.fontconfig</cachedir> |
| |
| <config> |
| <!-- |
| @@ -144,12 +133,6 @@ |
| <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR --> |
| <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR --> |
| </blank> |
| -<!-- |
| - Rescan configuration every 30 seconds when FcFontSetList is called |
| - --> |
| - <rescan> |
| - <int>30</int> |
| - </rescan> |
| </config> |
| |
| </fontconfig> |