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

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: Fixes for review issues. 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: 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 a34ca42d6c93170eed50732aa0ac8029f9d2197d..e18ea2528f4963b8fc8f289b125098cff3f3b9e0 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -21,10 +21,12 @@ scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create(
HeadsUpDisplayLayer::HeadsUpDisplayLayer(const LayerSettings& settings)
: Layer(settings),
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_Weight,
msw 2016/03/22 18:24:10 Shouldn't this param be a width, not a weight?
Mikus 2016/03/23 17:53:21 Done.
+ SkFontStyle::kUpright_Slant);
+ 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/base/resource/resource_bundle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698