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 void
nativeAddFontCollections
(long nativePtr) static long
nativeCreateFromArray
(long[] familyArray, long fallbackTypeface, int weight, int italic) static long
nativeCreateFromTypeface
(long nativeInstance, int style) static long
nativeCreateFromTypefaceWithExactStyle
(long nativeInstance, int weight, boolean italic) static long
nativeCreateFromTypefaceWithVariation
(long nativeInstance, List<FontVariationAxis> axes) static long
nativeCreateWeightAlias
(long nativeInstance, int weight) static void
nativeForceSetStaticFinalField
(String fieldName, Typeface typeface) static long
nativeGetFamily
(long nativePtr, int index) static int
nativeGetFamilySize
(long naitvePtr) static long
static int
nativeGetStyle
(long nativePtr) static int[]
nativeGetSupportedAxes
(long nativeInstance) static int
nativeGetWeight
(long nativePtr) static long[]
nativeReadTypefaces
(ByteBuffer buffer) static void
nativeRegisterGenericFamily
(String str, long nativePtr) static void
nativeSetDefault
(long nativePtr) static void
nativeWarmUpCache
(String fileName) static int
nativeWriteTypefaces
(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
-