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

Can't get emojis working on macOS #352

Open
4 tasks done
vtbassmatt opened this issue Nov 6, 2021 · 1 comment
Open
4 tasks done

Can't get emojis working on macOS #352

vtbassmatt opened this issue Nov 6, 2021 · 1 comment
Labels

Comments

@vtbassmatt
Copy link
Contributor

Describe the bug
I can't figure out the magic incantation to get emojis working on macOS.

To Reproduce

require 'squib'

# 'Apple Color Emoji' shows up in this list
#puts Squib.system_fonts

Squib::Deck.new(cards: 1) do
  background color: 'white'
  # tried this guy first
  #set font: 'Serif,Apple Color Emoji 10.5'
  text str: 'AB🤣😈CD', x: 0, y: 0, font: 'Serif,Apple Color Emoji, 10.5'
  save_png prefix: 'fonttest_'
end

Expected behavior
I should get a card with the string AB🤣😈CD on it. Instead, I get AB CD.

Screenshots
AB space space CD

Environment

  • OS: macOS 11.6.1
  • Ruby: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]
  • Squib: 0.18.0

Additional context
I'm certain there's a Pango font string I'm missing. https://github.com/GNOME/pango/blob/main/NEWS has several instances discussing emoji/color emoji improvements to Pango itself, and https://github.com/GNOME/pango/blob/9d389e936707ebcf84fbc64d07b8aa17cdf2ef04/pango/pangocoretext-fontmap.c#L1354 suggests that Pango should be automatically trying to fallback to Apple Color Emoji anyhow. But I'm stumped, nothing I've tried has worked.

Check the following:

  • I have updated Squib to the latest version.
  • I have checked the Squib issues backlog for something similar
  • I have attempted to make a minimal script demonstrating my problem
  • I have reviewed the Squib Docs and there's still a problem
@vtbassmatt vtbassmatt added the bug label Nov 6, 2021
@vtbassmatt
Copy link
Contributor Author

vtbassmatt commented Nov 6, 2021

Maybe the binding is to an older Cairo? 1.15.8 is supposed to support them.

Edit: nope, the changelog says Squib uses a new enough version of Cairo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant