OLD | NEW |
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 Loading... |
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 |
OLD | NEW |