public class FontAsset extends AbstractAsset
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<FontAsset> |
CREATOR |
static java.lang.String |
currentPreviewText |
protected boolean |
isDirty |
static FontAsset |
SYSTEM_FONT |
Modifier | Constructor and Description |
---|---|
protected |
FontAsset(android.os.Parcel in) |
|
FontAsset(java.lang.String id,
java.io.File fontFile)
Create Font Config
|
|
FontAsset(java.lang.String id,
java.lang.String fontAssetsPath)
Create Font Config
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
java.lang.Class<? extends AbstractAsset> |
getConfigType() |
float |
getFontScale() |
android.graphics.Typeface |
getTypeface()
Get typeface
|
float |
getXOffset() |
FontAsset |
setMatrics(float xOffset,
float fontScale) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
afterAddToAssetMap, equals, getId, hashCode
public static FontAsset SYSTEM_FONT
public static java.lang.String currentPreviewText
protected boolean isDirty
public static final android.os.Parcelable.Creator<FontAsset> CREATOR
public FontAsset(@NonNull java.lang.String id, @NonNull java.lang.String fontAssetsPath)
id
- Item identifierfontAssetsPath
- font file in assets path.public FontAsset(@NonNull java.lang.String id, @NonNull java.io.File fontFile)
id
- Item identifierfontFile
- font file path as file pathprotected FontAsset(android.os.Parcel in)
public FontAsset setMatrics(float xOffset, float fontScale)
public float getFontScale()
public float getXOffset()
@NonNull public android.graphics.Typeface getTypeface()
public final java.lang.Class<? extends AbstractAsset> getConfigType()
getConfigType
in class AbstractAsset
public int describeContents()
describeContents
in interface android.os.Parcelable
describeContents
in class AbstractAsset
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class AbstractAsset