| 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" |
| 13 |
| 12 #ifdef SK_BUILD_FOR_ANDROID | 14 #ifdef SK_BUILD_FOR_ANDROID |
| 13 | 15 |
| 14 #include "SkTypeface.h" | |
| 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. if no font is found, returns false. | 20 * the specified character. if no font is found, returns false. |
| 21 */ | 21 */ |
| 22 SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name); | 22 SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name); |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * For test only. | 25 * For test only. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 40 * stored in the typeface of the caller. It is provided as an aid to choose | 40 * stored in the typeface of the caller. It is provided as an aid to choose |
| 41 * the best next logical font. e.g. If the original font was bold or serif, | 41 * the best next logical font. e.g. If the original font was bold or serif, |
| 42 * but the 2nd in the logical chain was plain, then a subsequent call to | 42 * but the 2nd in the logical chain was plain, then a subsequent call to |
| 43 * get the 3rd can still inspect the original, and try to match its | 43 * get the 3rd can still inspect the original, and try to match its |
| 44 * stylistic attributes. | 44 * stylistic attributes. |
| 45 */ | 45 */ |
| 46 SkTypeface* SkAndroidNextLogicalTypeface(SkFontID currFontID, SkFontID origFontI
D, | 46 SkTypeface* SkAndroidNextLogicalTypeface(SkFontID currFontID, SkFontID origFontI
D, |
| 47 const SkPaintOptionsAndroid& options); | 47 const SkPaintOptionsAndroid& options); |
| 48 | 48 |
| 49 #endif // #ifdef SK_BUILD_FOR_ANDROID | 49 #endif // #ifdef SK_BUILD_FOR_ANDROID |
| 50 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| 51 |
| 52 #include "SkPaintOptionsAndroid.h" |
| 53 #include "../harfbuzz/src/harfbuzz-shaper.h" |
| 54 #include "../harfbuzz_ng/src/hb.h" |
| 55 |
| 56 /** |
| 57 * Return a new typeface for a fallback script. If the script is |
| 58 * not valid, or can not map to a font, returns null. |
| 59 * @param script The harfbuzz script id. |
| 60 * @param style The font style, for example bold |
| 61 * @param elegant true if we want the web friendly elegant version of the fon
t |
| 62 * @return reference to the matching typeface. Caller must call |
| 63 * unref() when they are done. |
| 64 */ |
| 65 SK_API SkTypeface* SkCreateTypefaceForScriptNG(hb_script_t script, SkTypeface::S
tyle style, |
| 66 SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid::
kDefault_Variant); |
| 67 |
| 68 SK_API SkTypeface* SkCreateTypefaceForScript(HB_Script script, SkTypeface::Style
style, |
| 69 SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid::
kDefault_Variant); |
| 70 |
| 71 #endif // #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| 50 #endif // #ifndef SkTypeface_android_DEFINED | 72 #endif // #ifndef SkTypeface_android_DEFINED |
| OLD | NEW |