Skip to content

Color emoji alongside plain text

Emoji require color tables and often different fallback fonts. This sample extends the baseline text lesson (Lesson 15) with multi-codepoint sequences in one string.

Verify line height and baseline when mixing emoji with math or CJK.

Draw text

ts
const text = new Text({
    x: 50,
    y: 100,
    content: 'Hello, world! \n🌹🌍🌞🌛',
    fontSize: 30,
    fill: '#F67676',
});

Released under the MIT License.