You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// https://github.com/diegomura/react-pdf/blob/9f7a2dffc66294f64ab39b3de68564e0a2e77ed8/packages/layout/src/text/emoji.js#L18-L35/** * When an emoji as no color, it might still have 2 parts, * the canonical emoji and an empty string. * ex. * (no color) Array.from('❤️') => ["❤", "️"] * (w/ color) Array.from('👍🏿') => ["👍", "🏿"] * * The empty string needs to be removed otherwise the generated * url will be incorect. */const_removeNoColor=x=>x!=='️';constgetCodePoints=string=>Array.from(string).filter(_removeNoColor).map(char=>char.codePointAt(0).toString(16)).join('-');
Since the Variation Selectors are being removed via the _removeNoColor function, we need to get additional options for the conditions under which the filter works.
Describe the bug
Variation Selectors (U+FE00..U+FE0F) were required depending on the emoji-source, causing emoji to not render correctly.
To Reproduce
example with twemoji
example with npm:emoji-datasource
Expected behavior
Since the Variation Selectors are being removed via the
_removeNoColor
function, we need to get additional options for the conditions under which the filter works.for example
Screenshots
Error screenshot
fixed with a simple patch Screenshot
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: