Package icyllis.modernui.graphics.text
Class EmojiFont
java.lang.Object
icyllis.modernui.graphics.text.EmojiFont
- All Implemented Interfaces:
Font
Special font for Color Emoji.
-
Constructor Summary
ConstructorsConstructorDescriptionEmojiFont(String name, it.unimi.dsi.fastutil.ints.IntSet coverage, int size, int ascent, int spacing, int base, it.unimi.dsi.fastutil.objects.Object2IntMap<CharSequence> map, List<String> files) -
Method Summary
Modifier and TypeMethodDescriptionintcalcGlyphScore(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) getFamilyName(Locale locale) getFileName(int glyphId) getFullName(Locale locale) intgetMetrics(FontPaint paint, FontMetricsInt fm) Expand the font metrics.intgetStyle()Returns the intrinsic style of this font.booleanhasGlyph(int ch, int vs) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface icyllis.modernui.graphics.text.Font
getFamilyName, getFullName
-
Constructor Details
-
EmojiFont
public EmojiFont(String name, it.unimi.dsi.fastutil.ints.IntSet coverage, int size, int ascent, int spacing, int base, it.unimi.dsi.fastutil.objects.Object2IntMap<CharSequence> map, List<String> files)
-
-
Method Details
-
getFileName
-
getStyle
public int getStyle()Description copied from interface:FontReturns 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
- Specified by:
getFullNamein interfaceFont
-
getFamilyName
- Specified by:
getFamilyNamein interfaceFont
-
getMetrics
Description copied from interface:FontExpand the font metrics.- Specified by:
getMetricsin interfaceFont- 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
public boolean hasGlyph(int ch, int vs) -
calcGlyphScore
public int calcGlyphScore(char[] buf, int start, int limit) - Specified by:
calcGlyphScorein interfaceFont
-
doSimpleLayout
public 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) - Specified by:
doSimpleLayoutin interfaceFont
-
doComplexLayout
public 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) - Specified by:
doComplexLayoutin interfaceFont
-
getNativeTypeface
- Specified by:
getNativeTypefacein interfaceFont
-