Text Appearance
Utility class that contains the data from parsing a TextAppearance style resource.
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Resolves the requested font using the fontFamily, style, and typeface.
open fun getFontAsync(@NonNull context: Context, @NonNull textPaint: TextPaint, @NonNull callback: TextAppearanceFontCallback)
Asynchronously resolves the requested font Typeface using the fontFamily, style, and typeface, and automatically updates given
textPaint
using updateTextPaintMeasureState on successful load.Link copied to clipboard
open fun updateDrawState(@NonNull context: Context, @NonNull textPaint: TextPaint, @NonNull callback: TextAppearanceFontCallback)
Applies the attributes that affect drawing from TextAppearance to the given TextPaint.
Link copied to clipboard
open fun updateMeasureState(@NonNull context: Context, @NonNull textPaint: TextPaint, @NonNull callback: TextAppearanceFontCallback)
Applies the attributes that affect measurement from TextAppearance to the given TextPaint.
Link copied to clipboard