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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
__constructor__
(AssetManager am, String path, boolean isAsset, int cookie) protected void
__constructor__
(Resources res, int resId) protected static ByteBuffer
createBuffer
(AssetManager am, String path, boolean isAsset, int cookie) The Android implementation attempts to callByteBuffer.array()
on a direct byte buffer.protected static void
nAddAxis
(long builderPtr, int tag, float value) protected static long
nBuild
(long builderPtr, ByteBuffer buffer, String filePath, int weight, boolean italic, int ttcIndex) protected static long
nBuild
(long builderPtr, ByteBuffer buffer, String filePath, String localeList, int weight, boolean italic, int ttcIndex) protected static long
nClone
(long fontPtr, long builderPtr, int weight, boolean italic, int ttcIndex) protected static long
RNG does not support native assetsprotected static long
protected 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
-