Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cairo.jl (and hence Luxor.jl) doesn't support emoji currently. 😢 #319

Open
rayegun opened this issue Sep 5, 2024 · 1 comment
Open

Comments

@rayegun
Copy link

rayegun commented Sep 5, 2024

Hey, is there any chance this could be fixed? I use Luxor.jl for generating our YouTube thumbnails (with Cormullion's backgrounds), and lack of emoji support makes it difficult for some talks who naughtily included emojis in their titles!

@cormullion
Copy link
Member

cormullion commented Sep 5, 2024

A good question.

JuliaGraphics/Cairo.jl#311

Perhaps if there was a text function that scanned input text for emoji characters and switched fonts…. but you’d also have to extract the widths of the emoji glyphs, which might involve Freetype. It could get tricky.

Typically in Cairo, text is one string/one fontface/one size, whereas in a terminal or browser the OS will rapidly switch between different fonts depending on which of the current active fonts can supply a valid glyph: on MacOS, emoji codes force a switch to AppleColorEmoji. “font fallback” is cool.

I don’t think there’s font fallback in Cairo - it would need to be written as a new method. The Makie folks don’t support emoji either, which suggests that it’s not trivial to do.

(I used to strip them from incoming text 😂)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants