large-type.com
large-type.com copied to clipboard
Properly segment Unicode graphemes.
Use window.Intl.Segmenter
to segment the text into graphemes so that non-trivial emojis are displayed properly (such as compound emojis with zero-width joiners).
This API has been supported by the major browsers since 2020/2021, and has recently in April gained support in Firefox as well. Nevertheless, I’ve implemented a graceful fallback to the old behavior for non-supporting browsers.