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

Unified Diff: content/shell/test_runner/resources/fonts/fonts.conf

Issue 2740483002: [Workaround] For running layout tests locally on Ubuntu16.04
Patch Set: Created 3 years, 9 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 | « build/install-build-deps.sh ('k') | docs/layout_tests_linux.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/test_runner/resources/fonts/fonts.conf
diff --git a/content/shell/test_runner/resources/fonts/fonts.conf b/content/shell/test_runner/resources/fonts/fonts.conf
index d337b12431d40127639bd7703d963f11d268412c..53eccb05c5844782ad7f546caeed0e195fd93455 100644
--- a/content/shell/test_runner/resources/fonts/fonts.conf
+++ b/content/shell/test_runner/resources/fonts/fonts.conf
@@ -249,4 +249,29 @@
</edit>
</match>
+ <!-- When we encounter a character that the current font doesn't
+ support, gfx::GetFallbackFontForChar() returns the first font
+ that does have a glyph for the character. The list of fonts is
+ sorted by a pattern that includes the current locale, but doesn't
+ include a font family (which means that the fallback font depends
+ on the locale but not on the current font).
+
+ DejaVu Sans is commonly the only font that supports some
+ characters, such as "⇧", and even when other candidates are
+ available, DejaVu Sans is commonly first among them, because of
+ the way Fontconfig is ordinarily configured. For example, the
+ configuration in the Fonconfig source lists DejaVu Sans under the
+ sans-serif generic family, and appends sans-serif to patterns
+ that don't already include a generic family (such as the pattern
+ in gfx::GetFallbackFontForChar()).
+
+ To get the same fallback font in the layout tests, we could
+ duplicate this configuration here, or more directly, simply
+ append DejaVu Sans to all patterns. -->
+ <match target="pattern">
+ <edit name="family" mode="append_last">
+ <string>DejaVu Sans</string>
+ </edit>
+ </match>
+
</fontconfig>
« no previous file with comments | « build/install-build-deps.sh ('k') | docs/layout_tests_linux.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698