TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Some flag emojis aren’t working on Chrome on Windows

288 pointsby gyanreyer4 months ago

26 comments

psychoslave4 months ago
The main issue I have with these flags is that they are more often than not used to indicate language, not country. But many countries have more than one official language and many languages are official language of more than one country.<p>Not many languages have some official flags though. There is one for Esperanto and Francophonie for example. But while anyone speaking Esperanto will certainly recognize the green flag, it&#x27;s more dubious that most users would recognize the flag of the OIF.<p><a href="https:&#x2F;&#x2F;commons.wikimedia.org&#x2F;wiki&#x2F;File:Flag_of_Esperanto.svg" rel="nofollow">https:&#x2F;&#x2F;commons.wikimedia.org&#x2F;wiki&#x2F;File:Flag_of_Esperanto.sv...</a><p><a href="https:&#x2F;&#x2F;isolatedtraveller.com&#x2F;flag-of-organisation-internationale-de-la-francophonie&#x2F;" rel="nofollow">https:&#x2F;&#x2F;isolatedtraveller.com&#x2F;flag-of-organisation-internati...</a>
评论 #42915118 未加载
评论 #42913318 未加载
评论 #42919976 未加载
评论 #42919102 未加载
评论 #42929686 未加载
评论 #42916252 未加载
hunter2_4 months ago
&gt; My approach was to draw an American flag emoji and then look at the pixels to see if any of them contained a non-grayscale color. This works because the Windows fallback emoji is just black&#x2F;white text<p>This is the kind of thing that works great for a while, and then an OS update flips the table on how RGB subpixel antialiasing works for the subset of your users with a certain type of display, leading to a false positive all of a sudden.<p>Chrome could at least expose support like other feature detection APIs, even if they don&#x27;t go so far as to provide the flags, to avoid this ridiculous heuristic approach.<p>Aside: my personal belief is that the political charge here lies with Unicode having codepoints for such countries, and downstream dependents of Unicode can readily point the finger. Displaying monochrome text of a country abbreviation instead of a flag doesn&#x27;t seem like it would appease those who don&#x27;t want the country acknowledged, anyhow; a &quot;missing glyph&quot; type of thing would come closer.
评论 #42920667 未加载
评论 #42912444 未加载
评论 #42919987 未加载
评论 #42912548 未加载
josephcsible4 months ago
I don&#x27;t get why Google doesn&#x27;t want to ship them with Chrome, since they&#x27;re not taking any more of a political stance by doing so than they are by shipping them with Android.
评论 #42913191 未加载
评论 #42915130 未加载
评论 #42913842 未加载
评论 #42916097 未加载
kccqzy4 months ago
&gt; My approach was to draw an American flag emoji and then look at the pixels to see if any of them contained a non-grayscale color. This works because the Windows fallback emoji is just black&#x2F;white text<p>Wait. I thought Windows has ClearType which could render black text on white background using colors. And furthermore there is a wizard to allow users to adjust how much ClearType adjustment there is. This feels like a totally incorrect solution.<p>And apparently starting from 2021 Microsoft Edge did in fact begin to use ClearText according to this article <a href="https:&#x2F;&#x2F;blogs.windows.com&#x2F;msedgedev&#x2F;2021&#x2F;06&#x2F;02&#x2F;improving-font-rendering-in-microsoft-edge&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blogs.windows.com&#x2F;msedgedev&#x2F;2021&#x2F;06&#x2F;02&#x2F;improving-fon...</a> from Microsoft. So the author&#x27;s approach would be broken in Microsoft Edge since 2021.
评论 #42912196 未加载
评论 #42912624 未加载
Jotalea4 months ago
&gt; Out of desperation I asked ChatGPT. It was useless as usual.<p>This is so real.
评论 #42914704 未加载
评论 #42922040 未加载
评论 #42920084 未加载
Arbortheus4 months ago
Dumb decision from Microsoft. Will they remove country borders from Bing Maps because they might be considered political too?
评论 #42911983 未加载
评论 #42911973 未加载
评论 #42911987 未加载
评论 #42912634 未加载
评论 #42919241 未加载
评论 #42916107 未加载
pentacent_hq4 months ago
Very helpful post! I was using flag emojis on a landing page and completely unaware that they weren&#x27;t being rendered correctly on Windows.<p>The author mentions a polyfill [1] and the fact that they dislike it&#x27;s using a CDN. Fortunately, the polyfill can be configured to use a local&#x2F;self-hosted font:<p>&gt; <i>polyfillCountryFlags(fontName?: string, fontUrl?: string)</i><p>Here&#x27;s how I added it to my Astro landing page: <a href="https:&#x2F;&#x2F;github.com&#x2F;pentacent&#x2F;keila-web&#x2F;commit&#x2F;e96ec233eef631ed9ca2c64e9b3b27d1a1153484">https:&#x2F;&#x2F;github.com&#x2F;pentacent&#x2F;keila-web&#x2F;commit&#x2F;e96ec233eef631...</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;talkjs&#x2F;country-flag-emoji-polyfill">https:&#x2F;&#x2F;github.com&#x2F;talkjs&#x2F;country-flag-emoji-polyfill</a>
skrebbel4 months ago
I&#x27;m the author of the country-flag-emoji-polyfill mentioned in the article. If the author reads this, maybe a correction is warranted: the polyfill doesn&#x27;t actually depend on public CDNs. The library itself is a regular NPM package so you can install it locally and bundle it into your JS, and it takes a parameter &quot;fontUrl&quot; for when you prefer to self-host the font file. It only falls back to jsdelivr when no URL is specified.<p>Nice writeup btw. I still can&#x27;t get over how ridiculous it is that Windows doesn&#x27;t have country flags emojis. It just means that every app&#x2F;website ends up applying a hacky patch like this.
xdennis4 months ago
Personally I prefer rendering country codes over flags because it allows me to spot and scold anyone who uses the flag of Chad to represent Romania (they look pretty much the same as emojis).
评论 #42924103 未加载
评论 #42912983 未加载
vintagedave4 months ago
&gt; although you’ll still be on the hook for downloading the entire 1.4MB font file<p>I haven&#x27;t tested with emojis (never thought of it, great test case!) but try Fontimize, which creates font subsets based on text your site actually uses. It runs over the HTML and CSS and creates an applicable subset.<p>But the Python API supports passing just some specific text. Try using that, passing any and every flag you wish. You should be able to get a font file that contains just the country flags this way.<p>I really need to get back to this library and add predefined subsets like, say, extended Latin, or country flags!<p><a href="https:&#x2F;&#x2F;github.com&#x2F;vintagedave&#x2F;Fontimize">https:&#x2F;&#x2F;github.com&#x2F;vintagedave&#x2F;Fontimize</a>
评论 #42920803 未加载
sandruso4 months ago
Yep, can confirm that emoji flags are evil. We had same problem. Windows users reported missing flags and few google searches away we found out that emoji flags are not supported.
demetrius4 months ago
My biggest problem with flag emojis is that flags change, so the meaning of text encoded with Unicode changes.<p>During the 2020 protests, Telegram changed large¹ BY emoji to the national white-red-white flag. Then it reverted the large emoji back to Łukašenka’s red-green flag. So, old conversations no longer have the same flag.<p>These flags don&#x27;t have the same meaning! They represent two very different visions of Belarus.<p>I would really prefer if Unicode encoded flags with date of their acceptance. E.g. BY-1991 or BY-1918 for white-red-white, BY-1995 for red-green flag.<p>_____________<p>¹ Small emoji retained red-green flag even at that time.<p>Also, Telegram has an option to replace large emoji with small emoji, so it was totally possible to send white-red-white flag and have it received as red-green flag, and vice versa.
ggm4 months ago
Found with related issues in work contexts that people can be very forgiving of baked-in things, and simply block on new entrants.<p>If you ship android as-is from a GIT repo that has &lt;forbidden thing&gt; you can be ok. If you write an app or show slideware which refers to &lt;forbidden thing&gt; you are in the naughty corner for a while.<p>It&#x27;s because people who are responding are responding intelligently. They know what they can effect: the future. The past, is another country. They can&#x27;t get the git repo to ban the &lt;forbidden thing&gt; but they can make your life hell for including it.<p>So to an outsider this looks &quot;inconsistent&quot; but its (in my opinion) entirely internally consistent: Only act on things you can influence.
fsckboy4 months ago
yes, we know, there are historical territorial disputes all over the world. But can somebody here make a case that this is not actually&#x2F;solely to appease China (over Taiwan presumably)?
评论 #42912835 未加载
评论 #42913490 未加载
评论 #42913144 未加载
B-Con4 months ago
Presumably this is a big company problem of playing politics safely: They didn&#x27;t want to take a position on the N country disputes out there by deciding which country code gets which flag and furthermore don&#x27;t want to acknowledge which country politics are even disputed and so don&#x27;t support the rest.
评论 #42912066 未加载
评论 #42912381 未加载
评论 #42914961 未加载
bobsmooth4 months ago
When politics meets programming.
butz4 months ago
Flag emojis were not working on Edge for who knows how long, and nobody cared.
moebrowne4 months ago
What are the chances this is already being used to help fingerprint users...
wkat42424 months ago
&gt; After doing more digging than I feel like I should have needed to, I found my answer: it appears that due to concerns about the fact that acknowledging the existence of certain countries can be perceived as a nominally political stance, Microsoft has opted to just avoid the issue altogether by not including country flag emojis in Windows’ system font.<p>Sigh.. I&#x27;m so sick of companies pandering to bad regimes. This, google displaying the south china sea as part of china locally, meta dropping their DEI program after trump took over. None of the companies I know showing pride flags in Arab countries on their website during pride month (while of course widely proclaiming their support in PR and internal material everywhere else). It&#x27;s all so fake. Stick by your values, then we stick by you as a customer.
danjl4 months ago
Does this problem disappear if you specify your own font for your site, like Roboto?
评论 #42912280 未加载
评论 #42912814 未加载
AraceliHarker4 months ago
Microsoft should adjust the flag font according to the language used, such as Simplified Chinese and Hebrew versions. However, Microsoft is not a company that respects the culture and language of each country. It has a bad habit of forcing what it decides in Redmond all over the world.
评论 #42918629 未加载
评论 #42914404 未加载
yieldcrv4 months ago
&gt; Can you imagine if, <i>gasp</i>, your computer could render a Taiwanese or Palestinian flag? The horror!<p>Just playing devil’s advocate but I kind of get it<p>If there was a separatist region you felt wasn’t legitimate or entirely delusional in both their existence and their aims, and third parties started giving them legitimacy with flags that your former neighbor made up at night, you would be like “cmon, wtf, cut that out”<p>obviously I can’t relate to this in any way, but I could imagine it could occur the longer I live
评论 #42919278 未加载
评论 #42917289 未加载
indulona4 months ago
yeah, i had to add svg icons to my frontend which takes a ton of space in the compiled project...for absolutely no good reason whatsoever.
bawolff4 months ago
Flag emoijis are a political nightmare.<p>Who is a country? Who is an autonomous region?<p>Which flag to use for disputed countries (e.g. do you use the taliban flag for afghanistan despite how much the western world doesn&#x27;t like it).<p>Not to mention people might not like the flag changing in their own messages after a take over. Imagine if russia wins the war in ukraine and all the patriotic ukrainians suddenly have the ukrainian flag in their old writings replaced with russian ones after a software update. Feels like something out of 1984.
评论 #42913071 未加载
tobr4 months ago
Since the article mentions using flags to represent languages, I feel obliged to point out that flags do not represent languages, so probably don’t use flags to represent languages.
评论 #42912182 未加载
评论 #42912637 未加载
评论 #42912510 未加载
评论 #42914053 未加载
评论 #42913363 未加载
评论 #42912457 未加载
评论 #42912640 未加载
评论 #42912442 未加载
评论 #42912332 未加载
评论 #42912565 未加载
评论 #42912903 未加载
评论 #42912398 未加载
slig4 months ago
Why are emojis tied to a OS font? The only reason I can think of is another way to force people to upgrade their OS, for instance, on macOS, even if your version was still supported, you wouldn&#x27;t get the new emojis until you upgraded.
评论 #42912308 未加载
评论 #42912277 未加载