OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 3 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
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 are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * 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 11 matching lines...) Expand all Loading... |
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
| 32 #include <unicode/locid.h> |
| 33 #include <memory> |
32 #include "SkFontMgr.h" | 34 #include "SkFontMgr.h" |
33 #include "SkStream.h" | 35 #include "SkStream.h" |
34 #include "SkTypeface.h" | 36 #include "SkTypeface.h" |
35 #include "platform/Language.h" | 37 #include "platform/Language.h" |
36 #include "platform/fonts/AlternateFontFamily.h" | 38 #include "platform/fonts/AlternateFontFamily.h" |
37 #include "platform/fonts/FontCache.h" | 39 #include "platform/fonts/FontCache.h" |
38 #include "platform/fonts/FontDescription.h" | 40 #include "platform/fonts/FontDescription.h" |
39 #include "platform/fonts/FontFaceCreationParams.h" | 41 #include "platform/fonts/FontFaceCreationParams.h" |
40 #include "platform/fonts/SimpleFontData.h" | 42 #include "platform/fonts/SimpleFontData.h" |
41 #include "platform/graphics/skia/SkiaUtils.h" | 43 #include "platform/graphics/skia/SkiaUtils.h" |
42 #include "public/platform/Platform.h" | 44 #include "public/platform/Platform.h" |
43 #include "public/platform/linux/WebSandboxSupport.h" | 45 #include "public/platform/linux/WebSandboxSupport.h" |
44 #include "wtf/Assertions.h" | 46 #include "wtf/Assertions.h" |
45 #include "wtf/PtrUtil.h" | 47 #include "wtf/PtrUtil.h" |
46 #include "wtf/text/AtomicString.h" | 48 #include "wtf/text/AtomicString.h" |
47 #include "wtf/text/CString.h" | 49 #include "wtf/text/CString.h" |
48 #include <memory> | |
49 #include <unicode/locid.h> | |
50 | 50 |
51 #if !OS(WIN) && !OS(ANDROID) | 51 #if !OS(WIN) && !OS(ANDROID) |
52 #include "SkFontConfigInterface.h" | 52 #include "SkFontConfigInterface.h" |
53 | 53 |
54 static sk_sp<SkTypeface> typefaceForFontconfigInterfaceIdAndTtcIndex( | 54 static sk_sp<SkTypeface> typefaceForFontconfigInterfaceIdAndTtcIndex( |
55 int fontconfigInterfaceId, | 55 int fontconfigInterfaceId, |
56 int ttcIndex) { | 56 int ttcIndex) { |
57 sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal()); | 57 sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal()); |
58 SkFontConfigInterface::FontIdentity fontIdentity; | 58 SkFontConfigInterface::FontIdentity fontIdentity; |
59 fontIdentity.fID = fontconfigInterfaceId; | 59 fontIdentity.fID = fontconfigInterfaceId; |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 fontDescription.isSyntheticBold(), | 274 fontDescription.isSyntheticBold(), |
275 ((fontDescription.style() == FontStyleItalic || | 275 ((fontDescription.style() == FontStyleItalic || |
276 fontDescription.style() == FontStyleOblique) && | 276 fontDescription.style() == FontStyleOblique) && |
277 !tf->isItalic()) || | 277 !tf->isItalic()) || |
278 fontDescription.isSyntheticItalic(), | 278 fontDescription.isSyntheticItalic(), |
279 fontDescription.orientation())); | 279 fontDescription.orientation())); |
280 } | 280 } |
281 #endif // !OS(WIN) | 281 #endif // !OS(WIN) |
282 | 282 |
283 } // namespace blink | 283 } // namespace blink |
OLD | NEW |