OLD | NEW |
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::setSkiaFontManager(SkFontMgr* fontManager) |
19 { | 19 { |
20 FontCache::setDirectWriteFactory(factory); | 20 FontCache::setFontManager(fontManager); |
21 } | 21 } |
22 | 22 |
23 // static | 23 // static |
24 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor) | 24 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor) |
25 { | 25 { |
26 FontCache::setDeviceScaleFactor(deviceScaleFactor); | 26 FontCache::setDeviceScaleFactor(deviceScaleFactor); |
27 } | 27 } |
28 | 28 |
29 // static | 29 // static |
30 void WebFontRendering::setUseSubpixelPositioning(bool useSubpixelPositioning) | 30 void WebFontRendering::setUseSubpixelPositioning(bool useSubpixelPositioning) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 SkFontHost::SetSubpixelOrder(order); | 62 SkFontHost::SetSubpixelOrder(order); |
63 } | 63 } |
64 | 64 |
65 // static | 65 // static |
66 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation) | 66 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation) |
67 { | 67 { |
68 SkFontHost::SetSubpixelOrientation(orientation); | 68 SkFontHost::SetSubpixelOrientation(orientation); |
69 } | 69 } |
70 | 70 |
71 } // namespace blink | 71 } // namespace blink |
OLD | NEW |