OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #ifndef SkTypeface_android_DEFINED | 9 #ifndef SkTypeface_android_DEFINED |
10 #define SkTypeface_android_DEFINED | 10 #define SkTypeface_android_DEFINED |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 * Optionally, if lower/upper bound params are provided and the returned | 80 * Optionally, if lower/upper bound params are provided and the returned |
81 * typeface is not NULL, then these params are populated with the range of | 81 * typeface is not NULL, then these params are populated with the range of |
82 * glyphIDs that this typeface is capable of resolving. The lower bound is | 82 * glyphIDs that this typeface is capable of resolving. The lower bound is |
83 * inclusive while the upper bound is exclusive. | 83 * inclusive while the upper bound is exclusive. |
84 */ | 84 */ |
85 SkTypeface* SkGetTypefaceForGlyphID(uint16_t glyphID, const SkTypeface* origType
face, | 85 SkTypeface* SkGetTypefaceForGlyphID(uint16_t glyphID, const SkTypeface* origType
face, |
86 const SkPaintOptionsAndroid& options, | 86 const SkPaintOptionsAndroid& options, |
87 int* lowerBounds = NULL, int* upperBounds =
NULL); | 87 int* lowerBounds = NULL, int* upperBounds =
NULL); |
88 | 88 |
89 #endif // #ifdef SK_BUILD_FOR_ANDROID | 89 #endif // #ifdef SK_BUILD_FOR_ANDROID |
90 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | |
91 | |
92 #include "SkPaintOptionsAndroid.h" | |
93 #include "../harfbuzz_ng/src/hb.h" | |
94 | |
95 /** | |
96 * Return a new typeface for a fallback script. If the script is | |
97 * not valid, or can not map to a font, returns null. | |
98 * @param script The harfbuzz script id. | |
99 * @param style The font style, for example bold | |
100 * @param elegant true if we want the web friendly elegant version of the fon
t | |
101 * @return reference to the matching typeface. Caller must call | |
102 * unref() when they are done. | |
103 */ | |
104 SK_API SkTypeface* SkCreateTypefaceForScript(hb_script_t script, SkTypeface::Sty
le style, | |
105 SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid::
kDefault_Variant); | |
106 | |
107 #endif // #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | |
108 #endif // #ifndef SkTypeface_android_DEFINED | 90 #endif // #ifndef SkTypeface_android_DEFINED |
OLD | NEW |