OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 SkFontMgr* fontManager() { return m_fontManager.get(); } | 105 SkFontMgr* fontManager() { return m_fontManager.get(); } |
106 static bool useDirectWrite() { return s_useDirectWrite; } | 106 static bool useDirectWrite() { return s_useDirectWrite; } |
107 static float deviceScaleFactor() { return s_deviceScaleFactor; } | 107 static float deviceScaleFactor() { return s_deviceScaleFactor; } |
108 static void setUseDirectWrite(bool useDirectWrite) { s_useDirectWrite = useD
irectWrite; } | 108 static void setUseDirectWrite(bool useDirectWrite) { s_useDirectWrite = useD
irectWrite; } |
109 static void setDirectWriteFactory(IDWriteFactory* factory) { s_directWriteFa
ctory = factory; } | 109 static void setDirectWriteFactory(IDWriteFactory* factory) { s_directWriteFa
ctory = factory; } |
110 static void setDeviceScaleFactor(float deviceScaleFactor) { s_deviceScaleFac
tor = deviceScaleFactor; } | 110 static void setDeviceScaleFactor(float deviceScaleFactor) { s_deviceScaleFac
tor = deviceScaleFactor; } |
111 static void setUseSubpixelPositioning(bool useSubpixelPositioning) { s_useSu
bpixelPositioning = useSubpixelPositioning; } | 111 static void setUseSubpixelPositioning(bool useSubpixelPositioning) { s_useSu
bpixelPositioning = useSubpixelPositioning; } |
112 static void addSideloadedFontForTesting(SkTypeface*); | 112 static void addSideloadedFontForTesting(SkTypeface*); |
113 #endif | 113 #endif |
114 | 114 |
115 #if ENABLE(OPENTYPE_VERTICAL) | |
116 typedef uint32_t FontFileKey; | 115 typedef uint32_t FontFileKey; |
117 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F
ontPlatformData&); | 116 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const F
ontPlatformData&); |
118 #endif | |
119 | 117 |
120 #if OS(ANDROID) | 118 #if OS(ANDROID) |
121 static AtomicString getGenericFamilyNameForScript(const AtomicString& family
Name, const FontDescription&); | 119 static AtomicString getGenericFamilyNameForScript(const AtomicString& family
Name, const FontDescription&); |
122 #else | 120 #else |
123 struct PlatformFallbackFont { | 121 struct PlatformFallbackFont { |
124 String name; | 122 String name; |
125 CString filename; | 123 CString filename; |
126 int fontconfigInterfaceId; | 124 int fontconfigInterfaceId; |
127 int ttcIndex; | 125 int ttcIndex; |
128 bool isBold; | 126 bool isBold; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 176 |
179 class PLATFORM_EXPORT FontCachePurgePreventer { | 177 class PLATFORM_EXPORT FontCachePurgePreventer { |
180 public: | 178 public: |
181 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } | 179 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } |
182 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } | 180 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } |
183 }; | 181 }; |
184 | 182 |
185 } // namespace blink | 183 } // namespace blink |
186 | 184 |
187 #endif | 185 #endif |
OLD | NEW |