Package org.robolectric.nativeruntime
Class TypefaceNatives
java.lang.Object
org.robolectric.nativeruntime.TypefaceNatives
Native methods for Typeface JNI registration.
Native method signatures are derived from https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/graphics/java/android/graphics/Typeface.java
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidnativeAddFontCollections(long nativePtr) static longnativeCreateFromArray(long[] familyArray, long fallbackTypeface, int weight, int italic) static longnativeCreateFromTypeface(long nativeInstance, int style) static longnativeCreateFromTypefaceWithExactStyle(long nativeInstance, int weight, boolean italic) static longnativeCreateFromTypefaceWithVariation(long nativeInstance, List<FontVariationAxis> axes) static longnativeCreateWeightAlias(long nativeInstance, int weight) static voidnativeForceSetStaticFinalField(String fieldName, Typeface typeface) static longnativeGetFamily(long nativePtr, int index) static intnativeGetFamilySize(long naitvePtr) static longstatic intnativeGetStyle(long nativePtr) static int[]nativeGetSupportedAxes(long nativeInstance) static intnativeGetWeight(long nativePtr) static long[]nativeReadTypefaces(ByteBuffer buffer) static voidnativeRegisterGenericFamily(String str, long nativePtr) static voidnativeSetDefault(long nativePtr) static voidnativeWarmUpCache(String fileName) static intnativeWriteTypefaces(ByteBuffer buffer, long[] nativePtrs)
-
Method Details
-
nativeCreateFromTypeface
public static long nativeCreateFromTypeface(long nativeInstance, int style) -
nativeCreateFromTypefaceWithExactStyle
public static long nativeCreateFromTypefaceWithExactStyle(long nativeInstance, int weight, boolean italic) -
nativeCreateFromTypefaceWithVariation
public static long nativeCreateFromTypefaceWithVariation(long nativeInstance, List<FontVariationAxis> axes) -
nativeCreateWeightAlias
public static long nativeCreateWeightAlias(long nativeInstance, int weight) -
nativeCreateFromArray
public static long nativeCreateFromArray(long[] familyArray, long fallbackTypeface, int weight, int italic) -
nativeGetSupportedAxes
public static int[] nativeGetSupportedAxes(long nativeInstance) -
nativeSetDefault
public static void nativeSetDefault(long nativePtr) -
nativeGetStyle
public static int nativeGetStyle(long nativePtr) -
nativeGetWeight
public static int nativeGetWeight(long nativePtr) -
nativeGetReleaseFunc
public static long nativeGetReleaseFunc() -
nativeGetFamilySize
public static int nativeGetFamilySize(long naitvePtr) -
nativeGetFamily
public static long nativeGetFamily(long nativePtr, int index) -
nativeRegisterGenericFamily
-
nativeWriteTypefaces
-
nativeReadTypefaces
-
nativeForceSetStaticFinalField
-
nativeAddFontCollections
public static void nativeAddFontCollections(long nativePtr) -
nativeWarmUpCache
-