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 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
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
-
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
-
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
-