1 /* 2 * Copyright 2012 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 9 #ifndef SkTypeface_android_DEFINED 10 #define SkTypeface_android_DEFINED 11 12 #include "SkTypeface.h" 13 #include "SkPaint.h" 14 15 #include "../harfbuzz/src/harfbuzz-shaper.h" 16 #include "../harfbuzz_ng/src/hb.h" 17 18 /** 19 * Return a new typeface for a fallback script. If the script is 20 * not valid, or can not map to a font, returns null. 21 * @param script The harfbuzz script id. 22 * @param style The font style, for example bold 23 * @param elegant true if we want the web friendly elegant version of the font 24 * @return reference to the matching typeface. Caller must call 25 * unref() when they are done. 26 */ 27 SK_API SkTypeface* SkCreateTypefaceForScriptNG(hb_script_t script, SkTypeface::Style style, 28 SkPaint::FontVariant fontVariant = SkPaint::kDefault_Variant); 29 30 SK_API SkTypeface* SkCreateTypefaceForScript(HB_Script script, SkTypeface::Style style, 31 SkPaint::FontVariant fontVariant = SkPaint::kDefault_Variant); 32 33 #endif 34