Package org.robolectric.shadows
Class ShadowNativeFont.ShadowNativeFontBuilder
- java.lang.Object
-
- org.robolectric.shadows.ShadowNativeFont.ShadowNativeFontBuilder
-
- Enclosing class:
- ShadowNativeFont
@Implements(value=android.graphics.fonts.Font.Builder.class, minSdk=28, shadowPicker=Picker.class, isInAndroidSdk=false) public static class ShadowNativeFont.ShadowNativeFontBuilder extends Object
Shadow forFont.Builderthat is backed by native code
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShadowNativeFont.ShadowNativeFontBuilder.PickerShadow picker forFont.Builder.
-
Constructor Summary
Constructors Constructor Description ShadowNativeFontBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void__constructor__(AssetManager am, String path, boolean isAsset, int cookie)protected void__constructor__(Resources res, int resId)protected static ByteBuffercreateBuffer(AssetManager am, String path, boolean isAsset, int cookie)The Android implementation attempts to callByteBuffer.array()on a direct byte buffer.protected static voidnAddAxis(long builderPtr, int tag, float value)protected static longnBuild(long builderPtr, ByteBuffer buffer, String filePath, int weight, boolean italic, int ttcIndex)protected static longnBuild(long builderPtr, ByteBuffer buffer, String filePath, String localeList, int weight, boolean italic, int ttcIndex)protected static longnClone(long fontPtr, long builderPtr, int weight, boolean italic, int ttcIndex)protected static longnGetReleaseNativeFont()protected static longnInitBuilder()
-
-
-
Method Detail
-
__constructor__
@Implementation(minSdk=29, maxSdk=29) protected void __constructor__(AssetManager am, String path, boolean isAsset, int cookie)
-
__constructor__
@Implementation(minSdk=29, maxSdk=29) protected void __constructor__(Resources res, int resId)
-
nInitBuilder
@Implementation(minSdk=29) protected static long nInitBuilder()
-
nAddAxis
@Implementation(minSdk=29) protected static void nAddAxis(long builderPtr, int tag, float value)
-
nBuild
@Implementation(minSdk=31) protected static long nBuild(long builderPtr, ByteBuffer buffer, String filePath, String localeList, int weight, boolean italic, int ttcIndex)
-
nBuild
@Implementation(minSdk=29, maxSdk=30) protected static long nBuild(long builderPtr, ByteBuffer buffer, String filePath, int weight, boolean italic, int ttcIndex)
-
nGetReleaseNativeFont
@Implementation(minSdk=29, maxSdk=33) protected static long nGetReleaseNativeFont()
-
nClone
@Implementation(minSdk=31) protected static long nClone(long fontPtr, long builderPtr, int weight, boolean italic, int ttcIndex)
-
createBuffer
@Implementation(minSdk=30) protected static ByteBuffer createBuffer(AssetManager am, String path, boolean isAsset, int cookie) throws IOException
The Android implementation attempts to callByteBuffer.array()on a direct byte buffer. This is supported in Libcore but not the JVM. Use an implementation that copies the data from the asset into a direct buffer.- Throws:
IOException
-
-