Package org.robolectric.shadows
Class ShadowNativeSystemFonts
java.lang.Object
org.robolectric.shadows.ShadowNativeSystemFonts
@Implements(value=android.graphics.fonts.SystemFonts.class, minSdk=29, isInAndroidSdk=false, shadowPicker=Picker.class) public class ShadowNativeSystemFonts extends Object
Shadow for
SystemFonts
for the Robolectric native runtime. It supports getting system
font config using a custom fonts path.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ShadowNativeSystemFonts.Picker
Shadow picker forSystemFonts
. -
Constructor Summary
Constructors Constructor Description ShadowNativeSystemFonts()
-
Method Summary
Modifier and Type Method Description static FontConfig.Alias[]
buildSystemFallback(String xmlPath, String systemFontDir, FontCustomizationParser.Result oemCustomization, ArrayMap<String,FontFamily[]> fallbackMap, ArrayList<Font> availableFonts)
protected static FontConfig
getSystemFontConfigInternal(String fontsXml, String systemFontDir, String oemXml, String productFontDir, Map<String,File> updatableFontMap, long lastModifiedDate, int configVersion)
protected static ByteBuffer
mmap(String fullPath)
-
Constructor Details
-
ShadowNativeSystemFonts
public ShadowNativeSystemFonts()
-
-
Method Details
-
getSystemFontConfigInternal
@Implementation(minSdk=31) protected static FontConfig getSystemFontConfigInternal(String fontsXml, String systemFontDir, String oemXml, String productFontDir, Map<String,File> updatableFontMap, long lastModifiedDate, int configVersion) -
buildSystemFallback
@Implementation(maxSdk=30) public static FontConfig.Alias[] buildSystemFallback(String xmlPath, String systemFontDir, FontCustomizationParser.Result oemCustomization, ArrayMap<String,FontFamily[]> fallbackMap, ArrayList<Font> availableFonts) -
mmap
-