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

Unified Diff: ui/gfx/font_render_params_linux.cc

Issue 811123002: linux/chromeos: Improve querying for Fontconfig defaults. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply review feedback Created 6 years 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
Index: ui/gfx/font_render_params_linux.cc
diff --git a/ui/gfx/font_render_params_linux.cc b/ui/gfx/font_render_params_linux.cc
index f4cd346e80fb8427a36bf5580e7361c00a705be8..70d5c72785abba20d32060940b1a825f4acabe4d 100644
--- a/ui/gfx/font_render_params_linux.cc
+++ b/ui/gfx/font_render_params_linux.cc
@@ -123,7 +123,13 @@ bool QueryFontconfig(const FontRenderParamsQuery& query,
// If the query was non-empty, match a specific font and destroy the query
// pattern. Otherwise, just use the query pattern.
FcPattern* result_pattern = query_pattern;
- if (!query.is_empty()) {
+ bool should_do_match = !query.is_empty();
+#if !defined(OS_CHROMEOS)
+ // Also perform a match for desktop Linux since many users don't have default
+ // patterns configured: http://crbug.com/442443, http://crbug.com/435277, etc.
+ should_do_match = true;
+#endif
+ if (should_do_match) {
FcResult result;
result_pattern = FcFontMatch(NULL, query_pattern, &result);
FcPatternDestroy(query_pattern);

Powered by Google App Engine
This is Rietveld 408576698