Stay organized with collections
Save and categorize content based on your preferences.
EmojiConsistency
class EmojiConsistency
The set of emoji that should be drawn by the system with the default font for device consistency. This is intended to be used only by applications that do custom emoji rendering using tools like android.text.style.ReplacementSpan
or custom emoji fonts. An example of how this should be used:
- Match emoji for third party custom rendering
- For each match, check against NonStandardEmoji before displaying custom glyph
- If in NonStandardEmojiSet, do not display custom glyph (render with android.graphics.Typeface.DEFAULT instead)
- Otherwise, do custom rendering like normal
Summary
Public methods |
static MutableSet<IntArray!> |
The set of emoji that should be drawn by the system with the default font for device consistency.
|
Public methods
getEmojiConsistencySet
static fun getEmojiConsistencySet(): MutableSet<IntArray!>
The set of emoji that should be drawn by the system with the default font for device consistency. Apps SHOULD attempt to avoid overwriting system emoji rendering with custom emoji glyphs for these codepoint sequences. Apps that display custom emoji glyphs via matching code may filter against this set. On match, the application SHOULD prefer Typeface.Default instead of a custom glyph Apps that use fonts may use this set to add android.text.style.TypefaceSpan
for android.graphics.Typeface.DEFAULT for matched codepoint sequences. Codepoint sequences returned MUST match exactly to be considered a match with the exception of Variation Selectors. All codepoint sequences returned MUST be a complete emoji codepoint sequence as defined by unicode.
Return |
MutableSet<IntArray!> |
set of codepoint sequences representing codepoints that should be rendered by the system using the default font. This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# EmojiConsistency\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nEmojiConsistency\n================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/text/EmojiConsistency \"View this page in Java\") \n\n```\nclass EmojiConsistency\n```\n\n|---|------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.text.EmojiConsistency](#) |\n\nThe set of emoji that should be drawn by the system with the default font for device consistency. This is intended to be used only by applications that do custom emoji rendering using tools like [android.text.style.ReplacementSpan](/reference/kotlin/android/text/style/ReplacementSpan) or custom emoji fonts. An example of how this should be used:\n\n1. Match emoji for third party custom rendering\n2. For each match, check against NonStandardEmoji before displaying custom glyph\n3. If in NonStandardEmojiSet, do not display custom glyph (render with android.graphics.Typeface.DEFAULT instead)\n4. Otherwise, do custom rendering like normal\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\\\u003c[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!\\\u003e | [getEmojiConsistencySet](#getEmojiConsistencySet())`()` The set of emoji that should be drawn by the system with the default font for device consistency. |\n\nPublic methods\n--------------\n\n### getEmojiConsistencySet\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun getEmojiConsistencySet(): MutableSet\u003cIntArray!\u003e\n```\n\nThe set of emoji that should be drawn by the system with the default font for device consistency. Apps SHOULD attempt to avoid overwriting system emoji rendering with custom emoji glyphs for these codepoint sequences. Apps that display custom emoji glyphs via matching code may filter against this set. On match, the application SHOULD prefer Typeface.Default instead of a custom glyph Apps that use fonts may use this set to add [android.text.style.TypefaceSpan](/reference/kotlin/android/text/style/TypefaceSpan) for android.graphics.Typeface.DEFAULT for matched codepoint sequences. Codepoint sequences returned MUST match exactly to be considered a match with the exception of Variation Selectors. All codepoint sequences returned MUST be a complete emoji codepoint sequence as defined by unicode.\n\n| Return ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\u003c[IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)!\u003e | set of codepoint sequences representing codepoints that should be rendered by the system using the default font. This value cannot be `null`. |"]]