Package org.robolectric.shadows
Class ShadowNativeTypeface
- java.lang.Object
-
- org.robolectric.shadows.ShadowTypeface
-
- org.robolectric.shadows.ShadowNativeTypeface
-
@Implements(value=android.graphics.Typeface.class, looseSignatures=true, minSdk=26, isInAndroidSdk=false) public class ShadowNativeTypeface extends ShadowTypeface
Shadow forTypefacethat is backed by native code
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShadowNativeTypeface.ShadowNativeTypefaceBuilderShadow forTypeface.Builder.-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowTypeface
ShadowTypeface.FontDesc, ShadowTypeface.Picker
-
-
Constructor Summary
Constructors Constructor Description ShadowNativeTypeface()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void__staticInitializer__()protected static voidbuildSystemFallback(String xmlPath, String systemFontDir, ArrayMap<String,Typeface> fontMap, ArrayMap<String,FontFamily[]> fallbackMap)ShadowTypeface.FontDescgetFontDescription()Returns the font description.protected static FilegetSystemFontConfigLocation()protected static ObjectmakeFamilyFromParsed(Object family, Object bufferForPathMap)protected static voidnativeAddFontCollections(long nativePtr)protected static longnativeCreateFromArray(long[] familyArray, int weight, int italic)protected static longnativeCreateFromArray(long[] familyArray, long fallbackTypeface, int weight, int italic)protected static longnativeCreateFromTypeface(long nativeInstance, int style)protected static longnativeCreateFromTypefaceWithExactStyle(long nativeInstance, int weight, boolean italic)protected static longnativeCreateFromTypefaceWithVariation(long nativeInstance, List<FontVariationAxis> axes)protected static longnativeCreateWeightAlias(long nativeInstance, int weight)protected static voidnativeForceSetStaticFinalField(String fieldName, Typeface typeface)protected static longnativeGetFamily(long nativePtr, int index)protected static intnativeGetFamilySize(long nativePtr)protected static longnativeGetReleaseFunc()protected static intnativeGetStyle(long nativePtr)protected static int[]nativeGetSupportedAxes(long nativeInstance)protected static intnativeGetWeight(long nativePtr)protected static long[]nativeReadTypefaces(ByteBuffer buffer)protected static long[]nativeReadTypefaces(ByteBuffer buffer, int position)protected static voidnativeRegisterGenericFamily(String str, long nativePtr)protected static voidnativeSetDefault(long nativePtr)protected static intnativeWriteTypefaces(ByteBuffer buffer, int position, long[] nativePtrs)protected static intnativeWriteTypefaces(ByteBuffer buffer, long[] nativePtrs)
-
-
-
Method Detail
-
__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, Object bufferForPathMap)
-
nativeCreateFromTypeface
@Implementation(minSdk=21) protected static long nativeCreateFromTypeface(long nativeInstance, int style)
-
nativeCreateFromTypefaceWithExactStyle
@Implementation(minSdk=26) protected static long nativeCreateFromTypefaceWithExactStyle(long nativeInstance, int weight, boolean italic)
-
nativeCreateFromTypefaceWithVariation
@Implementation(minSdk=26) protected static long nativeCreateFromTypefaceWithVariation(long nativeInstance, List<FontVariationAxis> axes)
-
nativeCreateWeightAlias
@Implementation(minSdk=21) 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) protected static long nativeCreateFromArray(long[] familyArray, long fallbackTypeface, int weight, int italic)
-
nativeGetSupportedAxes
@Implementation(minSdk=26) protected static int[] nativeGetSupportedAxes(long nativeInstance)
-
nativeSetDefault
@Implementation(minSdk=21) protected static void nativeSetDefault(long nativePtr)
-
nativeGetStyle
@Implementation(minSdk=21) protected static int nativeGetStyle(long nativePtr)
-
nativeGetWeight
@Implementation(minSdk=26) protected static int nativeGetWeight(long nativePtr)
-
nativeGetReleaseFunc
@Implementation(minSdk=28) 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)
-
nativeRegisterGenericFamily
@Implementation(minSdk=29) 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=10000) 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=10000) protected static long[] nativeReadTypefaces(ByteBuffer buffer, int position)
-
nativeForceSetStaticFinalField
@Implementation(minSdk=31) protected static void nativeForceSetStaticFinalField(String fieldName, Typeface typeface)
-
nativeAddFontCollections
@Implementation(minSdk=31) protected static void nativeAddFontCollections(long nativePtr)
-
getFontDescription
public ShadowTypeface.FontDesc getFontDescription()
Description copied from class:ShadowTypefaceReturns the font description.- Specified by:
getFontDescriptionin classShadowTypeface- Returns:
- Font description.
-
-