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

Unified Diff: ui/gfx/font_render_params_linux.cc

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Further Mac and Linux fixes. Created 4 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
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 526c19d0188c64eb0f426e260eae620a8758840f..6b8f98baa23e79028beaf6f154984c7d01f4d932 100644
--- a/ui/gfx/font_render_params_linux.cc
+++ b/ui/gfx/font_render_params_linux.cc
@@ -116,7 +116,9 @@ bool QueryFontconfig(const FontRenderParamsQuery& query,
FcPatternAddInteger(query_pattern.get(), FC_SLANT,
(query.style & Font::ITALIC) ? FC_SLANT_ITALIC : FC_SLANT_ROMAN);
FcPatternAddInteger(query_pattern.get(), FC_WEIGHT,
- (query.style & Font::BOLD) ? FC_WEIGHT_BOLD : FC_WEIGHT_NORMAL);
+ (query.weight == Font::Weight::INVALID)
+ ? static_cast<int>(Font::Weight::NORMAL)
+ : static_cast<int>(query.weight));
}
FcConfigSubstitute(NULL, query_pattern.get(), FcMatchPattern);

Powered by Google App Engine
This is Rietveld 408576698