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

Unified Diff: cc/layers/heads_up_display_layer.cc

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Alexei's issues Created 4 years, 8 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 | « no previous file | chrome/browser/ui/autofill/autofill_popup_controller_impl.cc » ('j') | ui/gfx/font.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer.cc
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
index 8d581dc4d8b3043f9cb9656c84213599341c1f91..3723991faccb60a5584fc3f1d19056acba70b82e 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -19,10 +19,12 @@ scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() {
HeadsUpDisplayLayer::HeadsUpDisplayLayer()
: typeface_(skia::AdoptRef(
- SkTypeface::CreateFromName("times new roman", SkTypeface::kNormal))) {
+ SkTypeface::CreateFromName("times new roman", SkFontStyle()))) {
if (!typeface_) {
- typeface_ = skia::AdoptRef(
- SkTypeface::CreateFromName("monospace", SkTypeface::kBold));
+ const SkFontStyle style(SkFontStyle::kBold_Weight,
+ SkFontStyle::kNormal_Width,
+ SkFontStyle::kUpright_Slant);
danakj 2016/05/19 21:54:59 why the upright?
Mikus 2016/05/20 07:11:33 This code has been changed on rebase. Now there ar
+ typeface_ = skia::AdoptRef(SkTypeface::CreateFromName("monospace", style));
}
DCHECK(typeface_.get());
SetIsDrawable(true);
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_popup_controller_impl.cc » ('j') | ui/gfx/font.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698