You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl: implement Canvas text drawing as used by Gravity Defied
implements android.graphics.Typeface (always uses default typeface for now), one version of Canvas.drawText, one version of Paint.measureText, and Paint.ascend
This commit is contained in:
14
src/api-impl-jni/graphics/android_graphics_Typeface.c
Normal file
14
src/api-impl-jni/graphics/android_graphics_Typeface.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "../defines.h"
|
||||
#include "../util.h"
|
||||
|
||||
#include "../../sk_area/include/c/sk_typeface.h"
|
||||
|
||||
#include "../generated_headers/android_graphics_Typeface.h"
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_android_graphics_Typeface_native_1create(JNIEnv *env, jclass this, jobject _family_name, jint style)
|
||||
{
|
||||
/* TODO: use the family name */
|
||||
return _INTPTR(sk_typeface_create_default()); /* TODO: recycle this */
|
||||
}
|
||||
Reference in New Issue
Block a user