OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "wtf/text/CString.h" | 46 #include "wtf/text/CString.h" |
47 #include <memory> | 47 #include <memory> |
48 #include <unicode/locid.h> | 48 #include <unicode/locid.h> |
49 | 49 |
50 #if !OS(WIN) && !OS(ANDROID) | 50 #if !OS(WIN) && !OS(ANDROID) |
51 #include "SkFontConfigInterface.h" | 51 #include "SkFontConfigInterface.h" |
52 | 52 |
53 static sk_sp<SkTypeface> typefaceForFontconfigInterfaceIdAndTtcIndex( | 53 static sk_sp<SkTypeface> typefaceForFontconfigInterfaceIdAndTtcIndex( |
54 int fontconfigInterfaceId, | 54 int fontconfigInterfaceId, |
55 int ttcIndex) { | 55 int ttcIndex) { |
56 SkAutoTUnref<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal()); | 56 sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal()); |
57 SkFontConfigInterface::FontIdentity fontIdentity; | 57 SkFontConfigInterface::FontIdentity fontIdentity; |
58 fontIdentity.fID = fontconfigInterfaceId; | 58 fontIdentity.fID = fontconfigInterfaceId; |
59 fontIdentity.fTTCIndex = ttcIndex; | 59 fontIdentity.fTTCIndex = ttcIndex; |
60 return fci->makeTypeface(fontIdentity); | 60 return fci->makeTypeface(fontIdentity); |
61 } | 61 } |
62 #endif | 62 #endif |
63 | 63 |
64 namespace blink { | 64 namespace blink { |
65 | 65 |
66 #if OS(ANDROID) || OS(LINUX) | 66 #if OS(ANDROID) || OS(LINUX) |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 fontDescription.isSyntheticBold(), | 263 fontDescription.isSyntheticBold(), |
264 ((fontDescription.style() == FontStyleItalic || | 264 ((fontDescription.style() == FontStyleItalic || |
265 fontDescription.style() == FontStyleOblique) && | 265 fontDescription.style() == FontStyleOblique) && |
266 !tf->isItalic()) || | 266 !tf->isItalic()) || |
267 fontDescription.isSyntheticItalic(), | 267 fontDescription.isSyntheticItalic(), |
268 fontDescription.orientation())); | 268 fontDescription.orientation())); |
269 } | 269 } |
270 #endif // !OS(WIN) | 270 #endif // !OS(WIN) |
271 | 271 |
272 } // namespace blink | 272 } // namespace blink |
OLD | NEW |