Class TypefaceNatives

java.lang.Object
org.robolectric.nativeruntime.TypefaceNatives

public final class TypefaceNatives extends Object
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 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

      public static void nativeRegisterGenericFamily(String str, long nativePtr)
    • nativeWriteTypefaces

      public static int nativeWriteTypefaces(ByteBuffer buffer, long[] nativePtrs)
    • nativeReadTypefaces

      public static long[] nativeReadTypefaces(ByteBuffer buffer)
    • nativeForceSetStaticFinalField

      public static void nativeForceSetStaticFinalField(String fieldName, Typeface typeface)
    • nativeAddFontCollections

      public static void nativeAddFontCollections(long nativePtr)
    • nativeWarmUpCache

      public static void nativeWarmUpCache(String fileName)