Live data from Hacker News

Some flag emojis aren’t working on Chrome on Windows

geyer.dev

181–190 of 328 posts

Re: Some flag emojis aren’t working on Chrome on Windows

#181
post #118
post #113

Earlier quoted context omitted.

Depends. The Navajo Nation and Cherokee Nation both have flags to use that could theoretically be incorporated into Unicode if they didn't draw the line at National flags, but you could always draw flag representations in SVG instead. But I also think this discussion has gone so far into the theoretical it's kind of ignored a very practical point: how many languages do you need to present in your software, because yo…

> Most software isn't going beyond the top two or three recognized languages in a given UN-recognized country There are over 30 languages in India with at least a million NATIVE speakers. 7 of those are in the top 30 most spoken languages in the world

I am already aware of that, but stating that here does not contradict what I said, neither that line specifically nor that line within the full context of my comment. Indian software written by Indians for the Indian market might be different though, but I'll defer to any Indians that want to chime in on that subject themselves.

Re: Some flag emojis aren’t working on Chrome on Windows

#182
post #129

Earlier quoted context omitted.

What does "actually in control" mean? When the IRA set up a checkpoint in Rosslea, should that have moved the border on the map? When there are disputes over uninhabited islands, do you want it to show whoever visited first? Obviously these are small examples, but the same issues apply to full-scale civil wars. You'd also be essentially legitimising the right of conquest if as soon as country A invades country B you…

> You'd also be essentially legitimising the right of conquest Documenting reality doesn't endorse what happened. Istanbul was Constantinople. Shit happens. If I'm travelling, I'd much rather the flags and borders reflect the situation on the ground instead of making meaningless humanitarian gestures.

It's the opposite of meaningless. Delegitimising wars of conquest massively reduced them and was a big part of why the 20th century was so much more peaceful on the whole (yes, even with the giant wars that did take place) than those before it.

Re: Some flag emojis aren’t working on Chrome on Windows

#183

I don't get why Google doesn't want to ship them with Chrome, since they're not taking any more of a political stance by doing so than they are by shipping them with Android.

Firefox has an custom cert management.

Chrome relies on the os certs.

I think that's the correct way how software should works.

Re: Some flag emojis aren’t working on Chrome on Windows

#185
post #18
post #11

> 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/white text 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…

The polyfill mentioned and linked in the article has a cleverer solution. It attempts to render the same flag emoji in two different text colors and checks if they end up being the same color or not (same color = probably a color glyph, ie an emoji). https://github.com/talkjs/country-flag-emoji-polyfill/blob/5...

(I'm the author of the polyfill, though note that all this code is pieced together from existing other libs with irrelevant parts removed; none of the good ideas are mine)

Just randomly sharing, the part of the trick I like the most is that it renders the emojis scaled down to a 1x1 canvas, so it renders just a single pixel. That makes checking stuff like "am i not accidentally reading in the transparent area of the glyph" and stuff like that no problem, because the whole emoji is blurred down to a single pixel.

The author's example is a bit weird in this regard, it does the same trick (set the canvas width and height to 1), and then it still loops through all 1 pixels and discards any transparent ones.

Re: Some flag emojis aren’t working on Chrome on Windows

#186

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. 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 f…

Are there any good iconic systems you know that identify languages directly?

Re: Some flag emojis aren’t working on Chrome on Windows

#187
I'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'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 "fontUrl" for when you prefer to self-host the font file. It only falls back to jsdelivr when no URL is specified.

Nice writeup btw. I still can't get over how ridiculous it is that Windows doesn't have country flags emojis. It just means that every app/website ends up applying a hacky patch like this.

Re: Some flag emojis aren’t working on Chrome on Windows

#188

I don't get why Google doesn't want to ship them with Chrome, since they're not taking any more of a political stance by doing so than they are by shipping them with Android.

A 1.4MB binary size cost is massive. I'm a chrome developer and our threshold for what you need to explain the cost/benefit of is 16KB. To me this just isn't worth the cost.

Fwiw just the country flags are 77kb if you use the Twemoji ones like Firefox does. Fancy shiny ones area bit bigger I suspect.

Re: Some flag emojis aren’t working on Chrome on Windows

#189

I don't get why Google doesn't want to ship them with Chrome, since they're not taking any more of a political stance by doing so than they are by shipping them with Android.

A 1.4MB binary size cost is massive. I'm a chrome developer and our threshold for what you need to explain the cost/benefit of is 16KB. To me this just isn't worth the cost.

[deleted]

Re: Some flag emojis aren’t working on Chrome on Windows

#190
post #186

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. 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 f…

Are there any good iconic systems you know that identify languages directly?

I don't think such a system does or can exist. e.g. nl-NL is distinct from nl-BE which is distinct from fr-BE. Using a country flag doesn't work if a country uses multiple languages. Languages themselves don't have icons to go with them like countries do, but even if they did it wouldn't distinguish between the same language spoken in different countries, which can matter a lot for how things get localized. nl-NL uses way more words with french roots than nl-BE for example.

What I tend to do is have a dropdown with a country icon and language name localized to that language for each language. My pet peeve is trying to switch a website from a language I don't speak into one I do speak and the dropdown listing "Dutch" as "Néerlandais" or whatever instead of "Nederlands". I don't speak french, why would I know what dutch is called in french?

Post reply on HN