react-typing-animation icon indicating copy to clipboard operation
react-typing-animation copied to clipboard

[Issue] Emoji are rendered like an unknown char symbol for a second

Open roma-glushko opened this issue 6 years ago • 2 comments

Description I have tried to add emoji to labels that I want to type via Typing and they are rendered in a weird way. Here is my component init:

<Typing loop={true}>
  <span>Test 1 🛠</span>
  <Typing.Delay ms={1000} />
  <span>Test 2 🛒🐹🧔</span>
</Typing>

Expected Result Emoji is rendered right away without showing unknown char symbol like letters.

Actual Result Emoji is rendered in a way when the unknown char symbol is shown firstly and then the actual emoji is rendered. This is a frustrating experience:

2019-09-17_09-56-39 (1)

Is it possible to fix somehow?

roma-glushko avatar Sep 17 '19 07:09 roma-glushko

I had this issue too and solved it by applying a class/style with a font-family to the span element containing the emoji (or just the emoji itself if you want the rest of the text to be in a particular font):

<Typing loop={true}>
  <span class="typing-emoji">Test 1 🛠</span>
  <Typing.Delay ms={1000} />
  <span class="typing-emoji">Test 2 🛒🐹🧔</span>
</Typing>
.typing-emoji {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

alexsands avatar Oct 02 '19 14:10 alexsands

@acsands13 that's neat! Thank you 🙌

roma-glushko avatar Oct 02 '19 16:10 roma-glushko