Summary: | Emoji character is horizontally misaligned when using COLR font | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nolan Lawson <nolan> | ||||||
Component: | Text | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | NEW --- | ||||||||
Severity: | Normal | CC: | bfulgham, fantasai.bugs, karlcow, mmaxfield, simon.fraser, vitor.roriz, webkit-bug-importer, zalan | ||||||
Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||||
Version: | Safari Technology Preview | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Nolan Lawson
2022-12-29 09:48:52 PST
Created attachment 464248 [details]
Repro HTML and TTF file
Thank you for filing this bug report! It looks like the preferred width computation has some issues with fallback fonts. It fails with any flexing type of layout (e.g. shrink to fit) -> .emoji { float: left; font-size: 22px; font-family: MozillaTwemojiColr; border: 1px solid black; } This is about measuring the emoji character. ComplexTextController returns 24px for Apple Color Emoji font, while 44px for MozillaTwemojiColr. When measured using MozillaTwemojiColr, ComplexTextController sees 2 glyphs U+263A and U+FE0F (variant selection) and they advance 22px individually. Myles, do you know what's going on here? |