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=29,
shadowPicker=Picker.class,
isInAndroidSdk=false,
callNativeMethodsByDefault=true)
public static class ShadowNativeFont.ShadowNativeFontBuilder
extends Object
Shadow for
Font.Builder that is backed by native code-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 longRNG does not support native assetsprotected static longprotected static long
-
Constructor Details
-
ShadowNativeFontBuilder
public ShadowNativeFontBuilder()
-
-
Method Details
-
__constructor__
@Implementation(minSdk=29, maxSdk=29) protected void __constructor__(AssetManager am, String path, boolean isAsset, int cookie) -
__constructor__
-
nInitBuilder
-
nAddAxis
@Implementation(minSdk=29, maxSdk=34) protected static void nAddAxis(long builderPtr, int tag, float value) -
nBuild
@Implementation(minSdk=31, maxSdk=34) 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
-
nClone
@Implementation(minSdk=31, maxSdk=34) 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
-
nGetReleaseNativeAssetFunc
RNG does not support native assets
-