Package icyllis.modernui.graphics.text
Interface Font
- All Known Implementing Classes:
EmojiFont,OutlineFont
public interface Font
Platform abstract font face, may represent a single font file.
For standard font, this may represent a fake font or logical font.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intcalcGlyphScore(char[] buf, int start, int limit) floatdoComplexLayout(char[] buf, int contextStart, int contextLimit, int layoutStart, int layoutLimit, boolean isRtl, FontPaint paint, it.unimi.dsi.fastutil.ints.IntArrayList glyphs, it.unimi.dsi.fastutil.floats.FloatArrayList positions, float[] advances, int advanceOffset, Rect bounds, float x, float y) floatdoSimpleLayout(char[] buf, int start, int limit, FontPaint paint, it.unimi.dsi.fastutil.ints.IntArrayList glyphs, it.unimi.dsi.fastutil.floats.FloatArrayList positions, float x, float y) default StringgetFamilyName(Locale locale) default StringgetFullName(Locale locale) intgetMetrics(FontPaint paint, FontMetricsInt fm) Expand the font metrics.intgetStyle()Returns the intrinsic style of this font.booleanhasGlyph(int ch, int vs)
-
Method Details
-
getStyle
int getStyle()Returns the intrinsic style of this font. For standard fonts, may return the style that this object is simulating. This indicates that this font can directly provide glyph images in this style. -
getFullName
-
getFullName
-
getFamilyName
-
getFamilyName
-
getMetrics
Expand the font metrics.- Parameters:
paint- a paint object used for retrieving font metrics.fm- a nullable destination object. If null is passed, this function only retrieve recommended interline spacing. If non-null is passed, this function expands to font metrics to it.- Returns:
- the font's interline spacing.
-
hasGlyph
@Internal boolean hasGlyph(int ch, int vs) -
calcGlyphScore
@Internal default int calcGlyphScore(char[] buf, int start, int limit) -
doSimpleLayout
@Internal float doSimpleLayout(char[] buf, int start, int limit, FontPaint paint, it.unimi.dsi.fastutil.ints.IntArrayList glyphs, it.unimi.dsi.fastutil.floats.FloatArrayList positions, float x, float y) -
doComplexLayout
@Internal float doComplexLayout(char[] buf, int contextStart, int contextLimit, int layoutStart, int layoutLimit, boolean isRtl, FontPaint paint, it.unimi.dsi.fastutil.ints.IntArrayList glyphs, it.unimi.dsi.fastutil.floats.FloatArrayList positions, float[] advances, int advanceOffset, Rect bounds, float x, float y) -
getNativeTypeface
-