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

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: add derat as OWNER for font_render_params* 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..7d9d6e8849490ee8310fa1f7434b2e13cb18a8ae 100644
--- a/ui/gfx/font_render_params_linux.cc
+++ b/ui/gfx/font_render_params_linux.cc
@@ -123,7 +123,14 @@ 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,
msw 2014/12/17 22:42:23 optional nit: to avoid wrapping onto the next line
Daniel Erat 2014/12/18 00:15:46 Done.
+ // 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