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 for
Typeface
that is backed by native code-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ShadowNativeTypeface.ShadowNativeTypefaceBuilder
Shadow forTypeface.Builder
.Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowTypeface
ShadowTypeface.FontDesc, ShadowTypeface.Picker
-
Constructor Summary
Constructors Constructor Description ShadowNativeTypeface()
-
Method Summary
Modifier and Type Method Description protected static void
__staticInitializer__()
protected static void
buildSystemFallback(String xmlPath, String systemFontDir, ArrayMap<String,Typeface> fontMap, ArrayMap<String,FontFamily[]> fallbackMap)
ShadowTypeface.FontDesc
getFontDescription()
Returns the font description.protected static File
getSystemFontConfigLocation()
protected static Object
makeFamilyFromParsed(Object family, Object bufferForPathMap)
protected static void
nativeAddFontCollections(long nativePtr)
protected static long
nativeCreateFromArray(long[] familyArray, int weight, int italic)
protected static long
nativeCreateFromArray(long[] familyArray, long fallbackTypeface, int weight, int italic)
protected static long
nativeCreateFromTypeface(long nativeInstance, int style)
protected static long
nativeCreateFromTypefaceWithExactStyle(long nativeInstance, int weight, boolean italic)
protected static long
nativeCreateFromTypefaceWithVariation(long nativeInstance, List<FontVariationAxis> axes)
protected static long
nativeCreateWeightAlias(long nativeInstance, int weight)
protected static void
nativeForceSetStaticFinalField(String fieldName, Typeface typeface)
protected static long
nativeGetFamily(long nativePtr, int index)
protected static int
nativeGetFamilySize(long nativePtr)
protected static long
nativeGetReleaseFunc()
protected static int
nativeGetStyle(long nativePtr)
protected static int[]
nativeGetSupportedAxes(long nativeInstance)
protected static int
nativeGetWeight(long nativePtr)
protected static long[]
nativeReadTypefaces(ByteBuffer buffer)
protected static long[]
nativeReadTypefaces(ByteBuffer buffer, int position)
protected static void
nativeRegisterGenericFamily(String str, long nativePtr)
protected static void
nativeSetDefault(long nativePtr)
protected static int
nativeWriteTypefaces(ByteBuffer buffer, int position, long[] nativePtrs)
protected static int
nativeWriteTypefaces(ByteBuffer buffer, long[] nativePtrs)
-
Constructor Details
-
ShadowNativeTypeface
public ShadowNativeTypeface()
-
-
Method Details
-
__staticInitializer__
-
buildSystemFallback
-
getSystemFontConfigLocation
-
makeFamilyFromParsed
-
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
-
nativeSetDefault
-
nativeGetStyle
-
nativeGetWeight
-
nativeGetReleaseFunc
-
nativeGetFamilySize
-
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
-
getFontDescription
Description copied from class:ShadowTypeface
Returns the font description.- Specified by:
getFontDescription
in classShadowTypeface
- Returns:
- Font description.
-