Package org.robolectric.shadows
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-
Nested Class Summary
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowTypeface
ShadowTypeface.FontDesc, ShadowTypeface.Picker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
protected static void
buildSystemFallback
(String xmlPath, String systemFontDir, ArrayMap<String, Typeface> fontMap, ArrayMap<String, FontFamily[]> fallbackMap) Returns the font description.protected static File
protected static Object
makeFamilyFromParsed
(Object family, Map<String, ByteBuffer> bufferForPath) 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
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
nativeRegisterLocaleList
(String locales) 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
@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
-
nativeGetStyle
-
nativeGetWeight
-
nativeGetReleaseFunc
-
nativeGetFamilySize
-
nativeGetFamily
@Implementation(minSdk=31, maxSdk=33) protected static long nativeGetFamily(long nativePtr, int index) -
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
Description copied from class:ShadowTypeface
Returns the font description.- Specified by:
getFontDescription
in classShadowTypeface
- Returns:
- Font description.
-