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

Side by Side Diff: content/renderer/render_view_linux.cc

Issue 2138613002: Set the font family for the "system-ui" generic font family on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jochen review nit (add braces) Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include "content/public/common/renderer_preferences.h" 7 #include "content/public/common/renderer_preferences.h"
8 #include "third_party/WebKit/public/web/linux/WebFontRendering.h" 8 #include "third_party/WebKit/public/web/linux/WebFontRendering.h"
9 #include "third_party/skia/include/core/SkFontLCDConfig.h" 9 #include "third_party/skia/include/core/SkFontLCDConfig.h"
10 #include "ui/gfx/font_render_params.h" 10 #include "ui/gfx/font_render_params.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 prefs.subpixel_rendering)); 62 prefs.subpixel_rendering));
63 WebFontRendering::setAntiAlias(prefs.should_antialias_text); 63 WebFontRendering::setAntiAlias(prefs.should_antialias_text);
64 WebFontRendering::setSubpixelRendering( 64 WebFontRendering::setSubpixelRendering(
65 prefs.subpixel_rendering != 65 prefs.subpixel_rendering !=
66 gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE); 66 gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE);
67 WebFontRendering::setSubpixelPositioning(prefs.use_subpixel_positioning); 67 WebFontRendering::setSubpixelPositioning(prefs.use_subpixel_positioning);
68 if (prefs.default_font_size > 0 && 68 if (prefs.default_font_size > 0 &&
69 prefs.default_font_size <= kMaxDefaultFontSize) { 69 prefs.default_font_size <= kMaxDefaultFontSize) {
70 WebFontRendering::setDefaultFontSize(prefs.default_font_size); 70 WebFontRendering::setDefaultFontSize(prefs.default_font_size);
71 } 71 }
72 #if !defined(OS_ANDROID)
73 if (!prefs.system_font_family_name.empty()) {
74 WebFontRendering::setSystemFontFamily(
75 blink::WebString::fromUTF8(prefs.system_font_family_name));
76 }
77 #endif
72 } 78 }
73 79
74 } // namespace content 80 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698