TypefaceEmojiRasterizer
@AnyThread
public class TypefaceEmojiRasterizer
Information about a single emoji. To draw this emoji on a canvas using use draw. To draw this emoji using custom code, use getCodepointAt and getTypeface to access the underlying emoji font and look up the glyph.
| See also | |
|---|---|
draw |
|
getCodepointAt |
|
getTypeface |
Summary
Public methods |
|
|---|---|
void |
Draws the emoji onto a canvas with origin at (x,y), using the specified paint. |
int |
getCodepointAt(int index) |
int |
|
int |
|
@NonNull Typeface |
|
int |
getWidth() |
boolean |
|
boolean |
If the platform requested that this emoji not be rendered using emojicompat. |
@NonNull String |
toString() |
Public methods
draw
public void draw(@NonNull Canvas canvas, float x, float y, @NonNull Paint paint)
Draws the emoji onto a canvas with origin at (x,y), using the specified paint.
getCodepointAt
public int getCodepointAt(int index)
| Parameters | |
|---|---|
int index |
index of the codepoint |
| Returns | |
|---|---|
int |
the codepoint at index |
getCodepointsLength
public int getCodepointsLength()
| Returns | |
|---|---|
int |
the length of the codepoints for this emoji |
isDefaultEmoji
public boolean isDefaultEmoji()
| Returns | |
|---|---|
boolean |
whether the emoji is in Emoji Presentation by default (without emoji style selector 0xFE0F) |
isPreferredSystemRender
public boolean isPreferredSystemRender()
If the platform requested that this emoji not be rendered using emojicompat.
| Returns | |
|---|---|
boolean |
true if this emoji should be drawn by the system instead of this renderer |