Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: include/ports/SkTypeface_android.h

Issue 26325003: Fix ambiguity in API if no matching system language is found (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ports/SkFontConfigInterface_android.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name); 29 SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name);
30 30
31 /** 31 /**
32 * Get the family name of the font in the fallback font list containing 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 33 * the specified character taking into account the provided language. This
34 * function also assumes the only families with the elegant or default variants 34 * function also assumes the only families with the elegant or default variants
35 * will be returned. 35 * will be returned.
36 * 36 *
37 * @param uni The unicode character to use for the lookup. 37 * @param uni The unicode character to use for the lookup.
38 * @param lang The null terminated string representing the BCP 47 language 38 * @param lang The null terminated string representing the BCP 47 language
39 * identifier for the preferred language 39 * identifier for the preferred language. If there is no unique
40 * fallback chain for that language the system's default language
41 * will be used.
40 * @param name The family name of the font file containing the unicode characte r 42 * @param name The family name of the font file containing the unicode characte r
41 * in the preferred language 43 * in the preferred language
42 * @return true if a font is found and false otherwise 44 * @return true if a font is found and false otherwise
43 */ 45 */
44 SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, const char* lang, SkSt ring* name); 46 SK_API bool SkGetFallbackFamilyNameForChar(SkUnichar uni, const char* lang, SkSt ring* name);
45 47
46 /** 48 /**
47 * For test only. 49 * For test only.
48 * Load font config from given xml files, instead of those from Android system. 50 * Load font config from given xml files, instead of those from Android system.
49 */ 51 */
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 * unref() when they are done. 103 * unref() when they are done.
102 */ 104 */
103 SK_API SkTypeface* SkCreateTypefaceForScriptNG(hb_script_t script, SkTypeface::S tyle style, 105 SK_API SkTypeface* SkCreateTypefaceForScriptNG(hb_script_t script, SkTypeface::S tyle style,
104 SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid:: kDefault_Variant); 106 SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid:: kDefault_Variant);
105 107
106 SK_API SkTypeface* SkCreateTypefaceForScript(HB_Script script, SkTypeface::Style style, 108 SK_API SkTypeface* SkCreateTypefaceForScript(HB_Script script, SkTypeface::Style style,
107 SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid:: kDefault_Variant); 109 SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid:: kDefault_Variant);
108 110
109 #endif // #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 111 #endif // #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
110 #endif // #ifndef SkTypeface_android_DEFINED 112 #endif // #ifndef SkTypeface_android_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/ports/SkFontConfigInterface_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698