Class ShadowNativeTypeface

java.lang.Object
org.robolectric.shadows.ShadowTypeface
org.robolectric.shadows.ShadowNativeTypeface

@Implements(value=android.graphics.Typeface.class, minSdk=26, isInAndroidSdk=false, callNativeMethodsByDefault=true) public class ShadowNativeTypeface extends ShadowTypeface
Shadow for Typeface that is backed by native code
  • Constructor Details

    • ShadowNativeTypeface

      public ShadowNativeTypeface()
  • Method Details

    • __staticInitializer__

      @Implementation(minSdk=31) protected static void __staticInitializer__()
    • buildSystemFallback

      @Implementation(minSdk=28, maxSdk=28) protected static void buildSystemFallback(String xmlPath, String systemFontDir, ArrayMap<String,Typeface> fontMap, ArrayMap<String,FontFamily[]> fallbackMap)
    • getSystemFontConfigLocation

      @Implementation(minSdk=26, maxSdk=27) protected static File getSystemFontConfigLocation()
    • makeFamilyFromParsed

      @Implementation(minSdk=26, maxSdk=27) protected static Object makeFamilyFromParsed(Object family, Map<String,ByteBuffer> bufferForPath)
    • nativeCreateFromTypeface

      @Implementation(maxSdk=34) protected static long nativeCreateFromTypeface(long nativeInstance, int style)
    • nativeCreateFromTypefaceWithExactStyle

      @Implementation(minSdk=26, maxSdk=34) protected static long nativeCreateFromTypefaceWithExactStyle(long nativeInstance, int weight, boolean italic)
    • nativeCreateFromTypefaceWithVariation

      @Implementation(minSdk=26, maxSdk=34) protected static long nativeCreateFromTypefaceWithVariation(long nativeInstance, List<FontVariationAxis> axes)
    • nativeCreateWeightAlias

      @Implementation(maxSdk=34) protected static long nativeCreateWeightAlias(long nativeInstance, int weight)
    • nativeCreateFromArray

      @Implementation(minSdk=26, maxSdk=30) protected static long nativeCreateFromArray(long[] familyArray, int weight, int italic)
    • nativeCreateFromArray

      @Implementation(minSdk=31, maxSdk=34) protected static long nativeCreateFromArray(long[] familyArray, long fallbackTypeface, int weight, int italic)
    • nativeGetSupportedAxes

      @Implementation(minSdk=26, maxSdk=34) protected static int[] nativeGetSupportedAxes(long nativeInstance)
    • nativeSetDefault

      @Implementation(maxSdk=34) protected static void nativeSetDefault(long nativePtr)
    • nativeGetStyle

      @Implementation(maxSdk=34) protected static int nativeGetStyle(long nativePtr)
    • nativeGetWeight

      @Implementation(minSdk=26, maxSdk=34) protected static int nativeGetWeight(long nativePtr)
    • nativeGetReleaseFunc

      @Implementation(minSdk=28, maxSdk=34) protected static long nativeGetReleaseFunc()
    • nativeGetFamilySize

      @Implementation(minSdk=31, maxSdk=33) protected static int nativeGetFamilySize(long nativePtr)
    • nativeGetFamily

      @Implementation(minSdk=31, maxSdk=33) protected static long nativeGetFamily(long nativePtr, int index)
    • nativeIsVariationInstance

      @Implementation(minSdk=36) protected static boolean nativeIsVariationInstance(long nativePtr)
    • nativeRegisterGenericFamily

      @Implementation(minSdk=29, maxSdk=34) protected static void nativeRegisterGenericFamily(String str, long nativePtr)
    • nativeWriteTypefaces

      @Implementation(minSdk=31, maxSdk=33) protected static int nativeWriteTypefaces(ByteBuffer buffer, long[] nativePtrs)
    • nativeWriteTypefaces

      @Implementation(minSdk=34, maxSdk=34) protected static int nativeWriteTypefaces(ByteBuffer buffer, int position, long[] nativePtrs)
    • nativeReadTypefaces

      @Implementation(minSdk=31, maxSdk=33) protected static long[] nativeReadTypefaces(ByteBuffer buffer)
    • nativeReadTypefaces

      @Implementation(minSdk=34, maxSdk=34) protected static long[] nativeReadTypefaces(ByteBuffer buffer, int position)
    • nativeForceSetStaticFinalField

      @Implementation(minSdk=31, maxSdk=34) protected static void nativeForceSetStaticFinalField(String fieldName, Typeface typeface)
    • nativeAddFontCollections

      @Implementation(minSdk=31, maxSdk=34) protected static void nativeAddFontCollections(long nativePtr)
    • nativeRegisterLocaleList

      @Implementation(minSdk=34, maxSdk=34) protected static void nativeRegisterLocaleList(String locales)
    • getFontDescription

      public ShadowTypeface.FontDesc getFontDescription()
      Description copied from class: ShadowTypeface
      Returns the font description.
      Specified by:
      getFontDescription in class ShadowTypeface
      Returns:
      Font description.