TypefaceEmojiRasterizer
@AnyThread
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 functions |
|
---|---|
Unit |
Draws the emoji onto a canvas with origin at (x,y), using the specified paint. |
Int |
getCodepointAt(index: Int) |
Int |
|
Int |
|
Typeface |
|
Int |
getWidth() |
Boolean |
|
Boolean |
If the platform requested that this emoji not be rendered using emojicompat. |
String |
toString() |
Public functions
draw
fun draw(canvas: Canvas, x: Float, y: Float, paint: Paint): Unit
Draws the emoji onto a canvas with origin at (x,y), using the specified paint.
getCodepointAt
fun getCodepointAt(index: Int): Int
Parameters | |
---|---|
index: Int |
index of the codepoint |
Returns | |
---|---|
Int |
the codepoint at index |
getCodepointsLength
fun getCodepointsLength(): Int
Returns | |
---|---|
Int |
the length of the codepoints for this emoji |
getTypeface
fun getTypeface(): Typeface
Returns | |
---|---|
Typeface |
return typeface to be used to render |
isDefaultEmoji
fun isDefaultEmoji(): Boolean
Returns | |
---|---|
Boolean |
whether the emoji is in Emoji Presentation by default (without emoji style selector 0xFE0F) |
isPreferredSystemRender
fun isPreferredSystemRender(): Boolean
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 |