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 ClassesNested classes/interfaces inherited from class org.robolectric.shadows.ShadowTypeface
ShadowTypeface.FontDesc, ShadowTypeface.Picker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidprotected static voidbuildSystemFallback(String xmlPath, String systemFontDir, ArrayMap<String, Typeface> fontMap, ArrayMap<String, FontFamily[]> fallbackMap) Returns the font description.protected static Fileprotected 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 longprotected 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)
-
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=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) 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:ShadowTypefaceReturns the font description.- Specified by:
getFontDescriptionin classShadowTypeface- Returns:
- Font description.
-