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

Side by Side Diff: third_party/WebKit/Source/web/win/WebFontRendering.cpp

Issue 1591883002: Add plumbing in blink to allow overriding the default font collection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up extra headers and declarations Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "public/web/win/WebFontRendering.h" 5 #include "public/web/win/WebFontRendering.h"
6 6
7 #include "platform/fonts/FontCache.h" 7 #include "platform/fonts/FontCache.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 // static 11 // static
12 void WebFontRendering::setUseDirectWrite(bool useDirectWrite) 12 void WebFontRendering::setUseDirectWrite(bool useDirectWrite)
13 { 13 {
14 FontCache::setUseDirectWrite(useDirectWrite); 14 FontCache::setUseDirectWrite(useDirectWrite);
15 } 15 }
16 16
17 // static 17 // static
18 void WebFontRendering::setDirectWriteFactory(IDWriteFactory* factory) 18 void WebFontRendering::setDirectWriteFactory(IDWriteFactory* factory)
19 { 19 {
20 FontCache::setDirectWriteFactory(factory); 20 FontCache::setDirectWriteFactory(factory);
21 } 21 }
22 22
23 // static 23 // static
24 void WebFontRendering::setSkiaFontManager(const skia::RefPtr<SkFontMgr>& fontMan ager)
25 {
26 FontCache::setFontManager(fontManager);
27 }
28
29 // static
24 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor) 30 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor)
25 { 31 {
26 FontCache::setDeviceScaleFactor(deviceScaleFactor); 32 FontCache::setDeviceScaleFactor(deviceScaleFactor);
27 } 33 }
28 34
29 // static 35 // static
30 void WebFontRendering::setUseSubpixelPositioning(bool useSubpixelPositioning) 36 void WebFontRendering::setUseSubpixelPositioning(bool useSubpixelPositioning)
31 { 37 {
32 FontCache::setUseSubpixelPositioning(useSubpixelPositioning); 38 FontCache::setUseSubpixelPositioning(useSubpixelPositioning);
33 } 39 }
(...skipping 28 matching lines...) Expand all
62 SkFontHost::SetSubpixelOrder(order); 68 SkFontHost::SetSubpixelOrder(order);
63 } 69 }
64 70
65 // static 71 // static
66 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation) 72 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation)
67 { 73 {
68 SkFontHost::SetSubpixelOrientation(orientation); 74 SkFontHost::SetSubpixelOrientation(orientation);
69 } 75 }
70 76
71 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698