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

Country flag doesn't display in ColorMyWorld on Windows #1757

Open
llaske opened this issue Feb 26, 2025 · 7 comments
Open

Country flag doesn't display in ColorMyWorld on Windows #1757

llaske opened this issue Feb 26, 2025 · 7 comments
Labels
bug to be release Fixed, to be release

Comments

@llaske
Copy link
Owner

llaske commented Feb 26, 2025

On Windows countries flags don't appear in popup when there is a click on the country.
The country code is displayed instead.

Image

Works on other OS.

@llaske llaske added the bug label Feb 26, 2025
@t-aswath
Copy link

Let me work on this issues

the problem lies with the icons in /activities/ColorMyWorld.activity/lib/flag.js

IN WINDOWS

Image

IN LINUX

Image

open up the flag.js in github (browser)
in windows you see the country code but in linux its icons

@t-aswath
Copy link

"""
Flag emojis often don't work properly on Windows because Microsoft has deliberately chosen not to include support for them in their standard emoji font, meaning that when you try to display a flag emoji, it won't render correctly, usually appearing as the country code letters instead of the visual flag image; this decision is likely due to the complexities of representing all country flags accurately and potentially sensitive political issues surrounding certain flags.
"""

source: google

@t-aswath
Copy link

My idea on fixing this problem will be to use country images
Have a folder /flag which as all the flags and use that to render the flags in the humane.log

Found 2 sources for flags

  1. https://hampusborgos.github.io/country-flags/
  2. https://flagpedia.net/download
    or share your preferred source

if this fix is ok for you please reply with the source that you prefer i will start to work on it

@AdityaKrSingh26
Copy link

AdityaKrSingh26 commented Feb 27, 2025

On Windows countries flags don't appear in popup when there is a click on the country. The country code is displayed instead.

Image

Works on other OS.

There could be 2 solutions:

  1. To fetch the flags online ( Example api : https://flagcdn.com/ )
  2. Another approach using SVG flags instead of emoji flags which will work consistently across all platforms including Windows.

Ig the second approach will be better as it will maintain a consistency on all the platforms the only issue in this approach that i can feel is that this might increase the number of svgs to handle to a greater extent, but if this is fine with you it can be worked upon.

What are you thougts on this @llaske ?

@llaske
Copy link
Owner Author

llaske commented Feb 27, 2025

I've read this notice regarding the Microsoft decision to not include flag emoji.
So we have no choice to use images instead.

Three important things however:

  • Images should use a free/libre/open source licence, it seems to be the case for Flagpedia : https://flagpedia.net/terms
  • Images should be host in the activity. Sugarizer must be able to run without Internet access
  • Images should be small: we don't want to add megabytes of images

@t-aswath
Copy link

Noted working on it

@llaske
Copy link
Owner Author

llaske commented Mar 10, 2025

Merged in #1758

@llaske llaske added the to be release Fixed, to be release label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug to be release Fixed, to be release
Projects
None yet
Development

No branches or pull requests

3 participants