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

Unified Diff: include/ports/SkTypeface_android.h

Issue 15720006: Android specific changes that are upstreamed from the android framework. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: missing declaration Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPaintOptionsAndroid.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/ports/SkTypeface_android.h
diff --git a/include/ports/SkTypeface_android.h b/include/ports/SkTypeface_android.h
index fa702cb011c642c64b3d415a0758c16967aa1fac..655670fb6b4625718c24f2df931cc7abba1cfc87 100644
--- a/include/ports/SkTypeface_android.h
+++ b/include/ports/SkTypeface_android.h
@@ -9,10 +9,10 @@
#ifndef SkTypeface_android_DEFINED
#define SkTypeface_android_DEFINED
-#ifdef SK_BUILD_FOR_ANDROID
-
#include "SkTypeface.h"
+#ifdef SK_BUILD_FOR_ANDROID
+
class SkPaintOptionsAndroid;
/**
@@ -47,4 +47,26 @@ SkTypeface* SkAndroidNextLogicalTypeface(SkFontID currFontID, SkFontID origFontI
const SkPaintOptionsAndroid& options);
#endif // #ifdef SK_BUILD_FOR_ANDROID
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+
+#include "SkPaintOptionsAndroid.h"
+#include "../harfbuzz/src/harfbuzz-shaper.h"
+#include "../harfbuzz_ng/src/hb.h"
+
+/**
+ * Return a new typeface for a fallback script. If the script is
+ * not valid, or can not map to a font, returns null.
+ * @param script The harfbuzz script id.
+ * @param style The font style, for example bold
+ * @param elegant true if we want the web friendly elegant version of the font
+ * @return reference to the matching typeface. Caller must call
+ * unref() when they are done.
+ */
+SK_API SkTypeface* SkCreateTypefaceForScriptNG(hb_script_t script, SkTypeface::Style style,
+ SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid::kDefault_Variant);
+
+SK_API SkTypeface* SkCreateTypefaceForScript(HB_Script script, SkTypeface::Style style,
+ SkPaintOptionsAndroid::FontVariant fontVariant = SkPaintOptionsAndroid::kDefault_Variant);
+
+#endif // #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
#endif // #ifndef SkTypeface_android_DEFINED
« no previous file with comments | « include/core/SkPaintOptionsAndroid.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698