Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / web / win / WebFontRendering.cpp
blob6b7c9c31cc5e91c145a0c56da6ca1375be72f200
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
3 // found in the LICENSE file.
5 #include "config.h"
6 #include "public/web/win/WebFontRendering.h"
8 #include "platform/fonts/FontCache.h"
10 namespace blink {
12 // static
13 void WebFontRendering::setUseDirectWrite(bool useDirectWrite)
15 FontCache::setUseDirectWrite(useDirectWrite);
18 // static
19 void WebFontRendering::setDirectWriteFactory(IDWriteFactory* factory)
21 FontCache::setDirectWriteFactory(factory);
24 // static
25 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor)
27 FontCache::setDeviceScaleFactor(deviceScaleFactor);
30 // static
31 void WebFontRendering::setUseSubpixelPositioning(bool useSubpixelPositioning)
33 FontCache::setUseSubpixelPositioning(useSubpixelPositioning);
36 // static
37 void WebFontRendering::addSideloadedFontForTesting(SkTypeface* typeface)
39 FontCache::addSideloadedFontForTesting(typeface);
42 // static
43 void WebFontRendering::setMenuFontMetrics(const wchar_t* familyName, int32_t fontHeight)
45 FontCache::setMenuFontMetrics(familyName, fontHeight);
48 // static
49 void WebFontRendering::setSmallCaptionFontMetrics(const wchar_t* familyName, int32_t fontHeight)
51 FontCache::setSmallCaptionFontMetrics(familyName, fontHeight);
54 // static
55 void WebFontRendering::setStatusFontMetrics(const wchar_t* familyName, int32_t fontHeight)
57 FontCache::setStatusFontMetrics(familyName, fontHeight);
60 // static
61 void WebFontRendering::setLCDOrder(SkFontHost::LCDOrder order)
63 SkFontHost::SetSubpixelOrder(order);
66 // static
67 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation)
69 SkFontHost::SetSubpixelOrientation(orientation);
72 } // namespace blink