Closed ctrlcctrlv closed 3 years ago
Yes this method is perhaps poorly named. It's used by other code to determine when it should attempt to try to retrieve embedded images. Since we don't currently support COLR
/CPAL
it doesn't make sense to return true
for that case. And you're right that embedded images may exist for non-emoji glyphs. I'll come up with a better name.
Just asking if the font has embedded images, as is currently done—
https://github.com/yeslogic/allsorts/blob/fef3d222be23035fbfa81d5e5013bf038d1c5f1c/src/font.rs#L620-L625
Is insufficient. Fonts may have embedded images, and only put them in the Latin range. Fonts may have no embedded images, but support emoji via COLR/CPAL—that's more common today on non-Apple platforms, actually.
Just an FYI.