5 ms·
Or you could generate the emoji symbol for the flag you want to display: country_code = 'AU' c1, c2 = map(lambda x: ord(x) + 0x1f1a5, country_code) flag
by rbut 5y ago
Or you could generate the emoji symbol for the flag you want to display:
country_code = 'AU'
c1, c2 = map(lambda x: ord(x) + 0x1f1a5, country_code)
flag = chr(c1) + chr(c2)
- TonyTrapp 5y agoWhich assumes that the user has a font installed containing all required emojis. It's much safer to assume that their browser can render SVGs.
- rbut 5y agoWhich is pretty much every current OS and device except Windows, but yes. Microsoft holding us back again.
- otrahuevada 5y agoNo font in Google fonts does, for instance. At least from their own little demonstrator. There is https://github.com/googlefonts/noto-emoji https://github.com/googlefonts/noto-emoji Noto Emoji which can render the flags but you need to build it yourself
- julianwachholz 5y agoI still assume political reasons and it's a lose lose situation for MS. E.g. they either include Taiwan's flag and lose China's approval, or they don't and get a huge backlash from everywhere else. PS: Firefox on Windows uses its own emoji font "Twemoji Mozilla" to display flags.