Why We Ditched Every Emoji Flag on MapGuesser
In late 2024, Syria changed its flag. Apple updated in March, Google in June, Twitter in January 2026. For a flag quiz game, relying on emojis was no longer an option. Here's how we rebuilt everything from scratch.
TL;DR — Emoji flags render differently across devices and take months to update when a country changes its flag. For MapGuesser, that was a real problem. We replaced them all with 254 HD images (768x576 px) in Apple's style, AI-upscaled 4x with the HAT-L model from Borderly captures. The result: identical rendering on every device, and a script that updates everything in a single command.
The bug we could no longer ignore
December 2024, Syria changes its flag. The Assad regime falls, and the country reverts to its independence flag — green-white-black with three red stars. The old one, red-white-black with two green stars, is gone.
In the months that follow, it's chaos. Apple updates its emoji in March 2025 (iOS 18.4). Samsung follows in April. Google Android? Not until June 2025. And Twitter/X? January 2026. For months, Flag Quiz players didn't see the same flag depending on their device. A player on a recent iPhone saw the new flag; their opponent on Android saw the old one.
For a game where you need to recognize flags, that's a dealbreaker.
We knew emoji flags were a fragile dependency. We figured the polyfill we were using (based on Twemoji) would be enough to standardize things. Except Twemoji hasn't really been maintained since the Twitter acquisition, and it didn't have the new Syrian flag either.
This was no longer something we could put off.
The real problem with emoji flags
An emoji flag is not an image. It's a Unicode code that each system interprets in its own way:
- Apple updates fastest, with a distinctive rendering (a subtle wavy effect, like a flag in the wind). Syria was updated in March 2025
- Google/Android displays flat rectangles. Syria wasn't updated until June 2025 — 3 months after Apple
- Windows straight-up showed country codes ("FR", "SY") instead of actual flags for years
- Samsung has yet another design and another schedule (April 2025 for Syria)
- Twitter/X (Twemoji) didn't update until January 2026 — over a year after the change
For a geography game, this creates absurd situations:
- A player loses because their flag is outdated and they don't recognize it
- Two players in the same game see two different flags
- Zoom in on any emoji and it's blurry — emojis render at a tiny resolution
We decided to stop depending on people who don't control the same thing we do. We needed to host our own flags.
Finding the right source
We didn't want plain flat rectangles. We wanted the Apple-style rendering — the one with the wavy effect that everyone knows from iPhone. It's more expressive than a rectangle, and it's the style our players are used to.
The problem: Apple doesn't distribute its emojis, and nobody has managed to reproduce that wavy effect in code properly.
That's where we found Borderly. It's an API that provides geographic assets: SVG maps, borders, flags. They also hit the same wall, and wrote a fascinating article ("The Quest for Wavy Flags") documenting everything they tried:
- SVG filters --> artificial-looking results
- Geometric deformations --> weird distortions
- JavaScript pixel manipulation --> not high enough quality
- macOS emoji screenshots --> perfect
No code-based technique convincingly reproduced Apple's rendering. So they went with the simplest approach: screenshots of the macOS emoji, served via their CDN. 251 flags at 192x144 pixels, identical to the iPhone rendering. We added 3 extra territories to reach our 254.
We had our source.
The size problem
192x144 pixels is fine for a small flag in a list. But in the Flag Quiz, players can zoom in to get a better look at a coat of arms or a symbol. And at 192 pixels wide, things get pixelated.
A basic upscale just makes the blur bigger. We needed a tool capable of inventing coherent details where there are none — AI upscaling.
Upscaling 254 flags with AI
We started by testing Real-ESRGAN, the most well-known model for this kind of task. Decent results, but the edges of stars and crescents lacked sharpness.
We then switched to HAT-L (Hybrid Attention Transformer), a newer model (CVPR 2023). Without going into the architecture details, the key difference is that HAT is much better at reconstructing sharp edges and geometric shapes — exactly what a flag is made of.
The model weighs 316 MB and runs on Apple Silicon chips (M1/M2/M3). About 30 seconds per flag, 2 hours to process all 254.
192x144 in, 768x576 out. Four times the resolution, with recreated details. Hover over the comparison slider to see the difference — and switch flags to explore:


It didn't work on the first try
If it had been that simple, this article would be three paragraphs long.
Transparency. Apple-style flags have a wavy outline on a transparent background. The first attempt converted the image to a solid format: black background everywhere. We had to handle transparency separately — upscale the colors on one side, the transparency mask on the other, and composite them back together.
Bleeding edges. The model saw the harsh transition between the flag and the transparent area and tried to smooth it, creating a white halo. We solved this by "extending" the edge colors into the transparent zone before upscaling — the model no longer sees a harsh transition, no more artifacts.
Unreadable text. 19 flags have text on them — national mottos, inscriptions, calligraphy. The AI model turned them into a blurry mess (the "ORDEM E PROGRESSO" on Brazil's flag became unreadable). For these flags, we automatically switch to a vector SVG when the display exceeds 200 pixels. The text stays sharp at any size.
What it looks like today
Each flag exists in three versions:
- Source (192x144) — the Borderly captures, kept so we can recalculate everything
- HD (768x576) — AI-upscaled, used everywhere in the game
- Vector SVG — for the 19 flags with text, at large sizes

Explore these flags in detail: France, Brazil, Japan, Australia, Bhutan, Syria, United Kingdom, Canada.
Everything is driven by a single script. When a country changes its flag, we re-run the command: the script detects what changed via checksums and only re-processes the affected flags.
We updated 16 components in the app, removed the emoji polyfill and two dependencies that were no longer needed. And most importantly: every player now sees the same flag, on every device.
The numbers
| Flags covered | 254 countries and territories |
| Source to final resolution | 192x144 --> 768x576 (x4) |
| AI model | HAT-L (316 MB) |
| Processing time | ~30 sec/flag, ~2h total |
| Flags with SVG fallback | 19 (those with text) |
What's next?
The next country that changes its flag, we're ready. One command and it's done. No more waiting for Apple, Google, and Microsoft to get on the same page.
If you're a developer using emoji flags in your app, take this as a lesson learned: it works until the day it doesn't. And when that day comes, you'd better have a plan B.
Want to see the result? Start a Flag Quiz game, test your knowledge with Countryle, or explore the flags of all 254 countries in the world.
Written by
Creator of MapGuesser
Sources
Frequently asked questions
The most notable case is Syria: in late 2024, after the fall of the Assad regime, the country reverted to its independence flag (green-white-black with three red stars). Other recent changes include Martinique (new flag adopted in 2023, gradually updated across platforms) and New Zealand, which regularly revives the debate over a flag change. MapGuesser updates its flags by simply re-running a script.
Emojis are not fixed images — they are codes that each device renders with its own font. Apple, Google, Samsung, and Microsoft each have their own set of flag emojis, with very different styles (wavy on Apple, flat rectangles on Google) and independent update schedules. When Syria changed its flag in late 2024, Apple updated in March 2025, Google only in June, and Twitter/X in January 2026. For months, the same emoji displayed two different flags depending on the device.
19 flags contain visible text: Brazil ('ORDEM E PROGRESSO'), Saudi Arabia (shahada in Arabic), Iran ('Allahu Akbar' calligraphy), Iraq, Afghanistan, and others like Belize, Bolivia, and Paraguay with their detailed coats of arms. On MapGuesser, these flags automatically switch to a vector SVG version when zoomed in, keeping the text readable.
AI upscaling (or super-resolution) enlarges an image while recreating details that the original did not have. Unlike a standard zoom that stretches pixels and makes the image blurry, an AI model trained on millions of images can 'guess' the missing details coherently. We use the HAT-L model to upscale our flags from 192x144 to 768x576 pixels.
We have an automated script that downloads flags from Borderly.dev, AI-upscales them to HD, and detects changes via checksums. When a flag changes, we just re-run the script: only the modified flags are re-processed. No more waiting for Apple or Google to update their emojis.
254 countries and territories are covered, including all UN member states and many territories (Guadeloupe, Greenland, Hong Kong, etc.). Each flag is available at 768x576 pixels. The 19 flags with text also have a vector SVG version so they stay readable at any size.