blob: b52d8e9e035da2ae880d9d90e0b2ae2258854dd6 [file] [log] [blame]
ananta99823932015-01-07 02:50:111// Copyright (c) 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "content/public/common/renderer_preferences.h"
6#include "content/renderer/render_view_impl.h"
7#include "third_party/WebKit/public/web/win/WebFontRendering.h"
8
9using blink::WebFontRendering;
10
11namespace content {
12
13void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() {
ananta3ac61e882015-01-08 14:27:3314 const RendererPreferences& prefs = renderer_preferences_;
15
16 // Cache the system font metrics in blink.
17 blink::WebFontRendering::setMenuFontMetrics(
18 prefs.menu_font_family_name.c_str(), prefs.menu_font_height);
19
20 blink::WebFontRendering::setSmallCaptionFontMetrics(
21 prefs.small_caption_font_family_name.c_str(),
22 prefs.small_caption_font_height);
23
24 blink::WebFontRendering::setStatusFontMetrics(
25 prefs.status_font_family_name.c_str(), prefs.status_font_height);
ananta99823932015-01-07 02:50:1126}
27
28} // namespace content