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 |
11 | 11 |
12 #include "SkTypeface.h" | 12 #include "SkTypeface.h" |
13 | 13 |
14 #ifdef SK_BUILD_FOR_ANDROID | 14 #ifdef SK_BUILD_FOR_ANDROID |
15 | 15 |
16 class SkPaintOptionsAndroid; | 16 class SkPaintOptionsAndroid; |
17 | 17 |
18 /** | 18 /** |
19 * Get the family name of the font in the fallback font list containing | 19 * Get the family name of the font in the fallback font list containing |
20 * the specified character using the system's default language. This function | |
21 * also assumes the only families with the elegant or default variants will be | |
22 * returned. | |
23 * | |
24 * @param uni The unicode character to use for the lookup. | |
25 * @param name The family name of the font file containing the unicode characte
r | |
26 * in the default language | |
27 * @return true if a font is found and false otherwise | |
28 */ | |
29 SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name); | |
30 | |
31 /** | |
32 * Get the family name of the font in the fallback font list containing | |
33 * the specified character taking into account the provided language. This | 20 * the specified character taking into account the provided language. This |
34 * function also assumes the only families with the elegant or default variants | 21 * function also assumes the only families with the elegant or default variants |
35 * will be returned. | 22 * will be returned. |
36 * | 23 * |
37 * @param uni The unicode character to use for the lookup. | 24 * @param uni The unicode character to use for the lookup. |
38 * @param lang The null terminated string representing the BCP 47 language | 25 * @param lang The null terminated string representing the BCP 47 language |
39 * identifier for the preferred language. If there is no unique | 26 * identifier for the preferred language. If there is no unique |
40 * fallback chain for that language the system's default language | 27 * fallback chain for that language the system's default language |
41 * will be used. | 28 * will be used. |
42 * @param name The family name of the font file containing the unicode characte
r | 29 * @param name The family name of the font file containing the unicode characte
r |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 * typeface is not NULL, then these params are populated with the range of | 68 * 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 | 69 * glyphIDs that this typeface is capable of resolving. The lower bound is |
83 * inclusive while the upper bound is exclusive. | 70 * inclusive while the upper bound is exclusive. |
84 */ | 71 */ |
85 SkTypeface* SkGetTypefaceForGlyphID(uint16_t glyphID, const SkTypeface* origType
face, | 72 SkTypeface* SkGetTypefaceForGlyphID(uint16_t glyphID, const SkTypeface* origType
face, |
86 const SkPaintOptionsAndroid& options, | 73 const SkPaintOptionsAndroid& options, |
87 int* lowerBounds = NULL, int* upperBounds =
NULL); | 74 int* lowerBounds = NULL, int* upperBounds =
NULL); |
88 | 75 |
89 #endif // #ifdef SK_BUILD_FOR_ANDROID | 76 #endif // #ifdef SK_BUILD_FOR_ANDROID |
90 #endif // #ifndef SkTypeface_android_DEFINED | 77 #endif // #ifndef SkTypeface_android_DEFINED |
OLD | NEW |