-
Notifications
You must be signed in to change notification settings - Fork 85
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
unicode.symbol
shows ISO 3166-1 alpha-2 notation instead of flags
#331
Comments
@rempsyc good to see you here! You’re right, those are not R graphics. They are emojis encoded as Unicode characters. You need a device that will display them properly. On GitHub your example appears fine to me. |
That's weird. It works for me on my Windows machine, on the Github App in iPhone, and in Safari on iPhone. Some links on Google suggest you may need to install fonts that support the emoji unicodes, but frankly I'm not sure exactly what to recommend. |
What OS (including version) are you using? How does https://emojipedia.org/flags/ look? |
Actually, @vincentarelbundock, what OS version and browser are you using? Windows 10+ doesn't ship with flag emojis for political reasons. Firefox ships their own emoji font to plug that hole, but most other browsers don't. I don't know what fonts RStudio uses by default. I don't have a Windows computer to test. |
Ah yes! I was using Windows 11 with Firefox. So I guess I'm benefiting from the built-in emoji font. |
Hum, I see. I can confirm that I can see it correctly on my phone OR using Firefox, but not any of the other browsers. Vincent just to be thorough, what does it look like within the RStudio viewer for you? If the flags don't appear correctly within RStudio for all Windows users (and most browsers), would this be worth a note in the readme since there might be a lot of confused users? On my end it is suddenly a bit less practical to use Unicode flags (damn Windows!!), I guess I'll need to rely on actual images of the flags for my purposes... |
I would be curious to know if installing Noto Color Emoji on the system would cause them to be shown in RStudio. Restarting RStudio might be required. (I think this won't work for most Chromium-based browsers, since they only fall back to official system fonts, but I don't know how RStudio selects fonts.) |
Turns out Rstudio does not display them. (I never use Rstudio so had not noticed.)
Yes, I think that's a good idea. |
And, just for completeness, RStudio does display them on macOS. (At least it does for me. I think it would do it out-of-the-box.) |
So I installed Noto Color Emoji and restarted RStudio, but still no luck. It seems RStudio doesn't automatically change font if some emojis are not available. Anyway, glad I was able to to make a small contribution by shedding light on the user experience of most Windows users ;) |
Hello Vincent! I'm glad I finally get to use your
countrycode
package!I am having an issue with the country flags
unicode.symbol
. I know that your README mentions:But I believe the example provided (gt table) is not R graphics. You will see in the example below that instead of showing the country flags, like this:
It only shows their ISO 3166-1 alpha-2 notation (CA, DE, etc.):
Created on 2023-06-11 with reprex v2.0.2
Session info
Any idea why this might be the case? Could there be something wrong on my system?
The text was updated successfully, but these errors were encountered: