Package org.robolectric.shadows
Class ShadowLegacyTypeface
java.lang.Object
org.robolectric.shadows.ShadowTypeface
org.robolectric.shadows.ShadowLegacyTypeface
@Implements(value=android.graphics.Typeface.class,
isInAndroidSdk=false)
public class ShadowLegacyTypeface
extends ShadowTypeface
Shadow for
Typeface.-
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 void__constructor__(long fontId) Starting in U, this constructor calls__constructor__(long, String)below.protected void__constructor__(long fontId, String familyName) protected void__constructor__(long fontId, String familyName, Typeface derivedFrom) protected static voidprotected static voidbuildSystemFallback(String xmlPath, String fontDir, ArrayMap<String, Typeface> fontMap, ArrayMap<String, Object> fallbackMap) protected static Typefaceprotected static Typefaceprotected static Typefaceprotected static TypefacecreateFromAsset(AssetManager mgr, String path) protected static TypefacecreateFromFamilies(Object families) protected static TypefacecreateFromFamiliesWithDefault(Object families) protected static TypefacecreateFromFamiliesWithDefault(Object families, int weight, int italic) protected static TypefacecreateFromFamiliesWithDefault(Object families, String fallbackName, int weight, int italic) protected static TypefacecreateFromFile(File path) protected static TypefacecreateFromFile(String path) protected static TypefacecreateFromResources(Object entry, AssetManager mgr, String path) protected static TypefacecreateFromResources(AssetManager mgr, String path, int cookie) protected static TypefacecreateUnderlyingTypeface(String familyName, int style) booleanReturns the font description.protected intgetStyle()inthashCode()protected static voidinit()Avoid spurious error message about /system/etc/fonts.xmlprotected static voidinitSystemDefaultTypefaces(Map<String, Typeface> systemFontMap, Map<String, ?> fallbacks, Object aliases) protected static longnativeCreateFromArray(long[] familyArray, int weight, int italic) protected static longnativeCreateFromArray(long[] familyArray, long fallbackTypeface, int weight, int italic) protected static voidnativeForceSetStaticFinalField(String fieldname, Typeface typeface) static voidreset()
-
Constructor Details
-
ShadowLegacyTypeface
public ShadowLegacyTypeface()
-
-
Method Details
-
__constructor__
@Implementation(maxSdk=33) protected void __constructor__(long fontId) Starting in U, this constructor calls__constructor__(long, String)below. -
__constructor__
@Implementation(minSdk=34) @InDevelopment protected void __constructor__(long fontId, String familyName) -
__constructor__
-
__staticInitializer__
@Implementation protected static void __staticInitializer__() -
create
-
create
-
create
-
createFromAsset
-
createFromResources
@Implementation(minSdk=26, maxSdk=28) protected static Typeface createFromResources(AssetManager mgr, String path, int cookie) -
createFromResources
@Implementation(minSdk=26) protected static Typeface createFromResources(Object entry, AssetManager mgr, String path) -
createFromFile
-
createFromFile
-
getStyle
@Implementation protected int getStyle() -
equals
-
hashCode
@Implementation public int hashCode() -
createFromFamilies
-
createFromFamiliesWithDefault
-
createFromFamiliesWithDefault
-
createFromFamiliesWithDefault
-
buildSystemFallback
-
init
@Implementation(maxSdk=27) protected static void init()Avoid spurious error message about /system/etc/fonts.xml -
initSystemDefaultTypefaces
-
reset
@Resetter public static void reset() -
createUnderlyingTypeface
-
nativeCreateFromArray
@Implementation(minSdk=26, maxSdk=30) protected static long nativeCreateFromArray(long[] familyArray, int weight, int italic) -
getFontDescription
Returns the font description.- Specified by:
getFontDescriptionin classShadowTypeface- Returns:
- Font description.
-
nativeForceSetStaticFinalField
-
nativeCreateFromArray
@Implementation(minSdk=31) protected static long nativeCreateFromArray(long[] familyArray, long fallbackTypeface, int weight, int italic)
-