Skip to content

Commit ae8218b

Browse files
committed
[jni] Proper variation instance method name mapping
1 parent 7b949ec commit ae8218b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tehreer-android/src/main/jni/Typeface.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ static void dispose(JNIEnv *env, jobject obj, jlong typefaceHandle)
592592
delete typeface;
593593
}
594594

595-
static jlong deriveVariation(JNIEnv *env, jobject obj, jlong typefaceHandle, jfloatArray coordinates)
595+
static jlong getVariationInstance(JNIEnv *env, jobject obj, jlong typefaceHandle, jfloatArray coordinates)
596596
{
597597
Typeface *typeface = reinterpret_cast<Typeface *>(typefaceHandle);
598598
jint numCoords = env->GetArrayLength(coordinates);
@@ -607,9 +607,9 @@ static jlong deriveVariation(JNIEnv *env, jobject obj, jlong typefaceHandle, jfl
607607

608608
env->ReleasePrimitiveArrayCritical(coordinates, coordBuffer, 0);
609609

610-
Typeface *derived = typeface->deriveVariation(fixedCoords, numCoords);
610+
Typeface *variationInstance = typeface->deriveVariation(fixedCoords, numCoords);
611611

612-
return reinterpret_cast<jlong>(derived);
612+
return reinterpret_cast<jlong>(variationInstance);
613613
}
614614

615615
static void getVariationCoordinates(JNIEnv *env, jobject obj, jlong typefaceHandle, jfloatArray coordinates)
@@ -846,7 +846,7 @@ static JNINativeMethod JNI_METHODS[] = {
846846
{ "nCreateWithFile", "(Ljava/lang/String;)J", (void *)createWithFile },
847847
{ "nCreateFromStream", "(Ljava/io/InputStream;)J", (void *)createFromStream },
848848
{ "nDispose", "(J)V", (void *)dispose },
849-
{ "nDeriveVariation", "(J[F)J", (void *)deriveVariation },
849+
{ "nGetVariationInstance", "(J[F)J", (void *)getVariationInstance },
850850
{ "nGetVariationCoordinates", "(J[F)V", (void *)getVariationCoordinates },
851851
{ "nGetTableData", "(JI)[B", (void *)getTableData },
852852
{ "nSearchNameRecordIndex", "(JI)I", (void *)searchNameRecordIndex },

0 commit comments

Comments
 (0)