Skip to content

Commit cf69e5c

Browse files
aborrusoclaude
andcommitted
Fix flag emoji rendering on desktop/Linux
Replace text emojis with Twemoji SVG images for cross-platform compatibility. Flags now visible on all browsers regardless of system emoji font support. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 2872683 commit cf69e5c

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

LOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## 2026-02-02
44

5+
### Website - Fix flag emoji rendering on Linux/desktop
6+
7+
- **Fix**: Replace emoji flags with SVG images from Twemoji CDN
8+
- **Problem**: Country flag emojis (🇮🇹, 🇺🇸, 🇨🇦, 🇦🇺, 🇬🇧, 🇨🇭) not visible on Linux/desktop browsers lacking color emoji fonts
9+
- **Solution**: Use `<img>` tags pointing to `https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/`
10+
- **Benefits**: Works on all platforms, consistent appearance, better accessibility
11+
- **Files**: `website/src/pages/index.astro` (6 flag replacements), `website/src/styles/global.css` (removed `.emoji-flag` class)
12+
- **Impact**: Flags now visible on all devices (Linux, Windows, macOS, mobile)
13+
514
### Release v0.4.38
615

716
- Enhancement: add portal entries and API base URLs for catalog.data.gov, open.canada.ca, data.gov.au, and opendata.swiss

website/src/pages/index.astro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ const baseUrl = '/ckan-mcp-server';
480480
class="portal-card bg-white p-6 border border-gray-200"
481481
>
482482
<div class="flex items-center gap-3 mb-3">
483-
<span class="text-3xl emoji-flag">🇮🇹</span>
483+
<img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f1ee-1f1f9.svg" alt="🇮🇹" class="w-8 h-8" />
484484
<h3 class="display-font text-xl font-semibold text-navy">dati.gov.it</h3>
485485
</div>
486486
<p class="text-sm text-gray-600">Italian National Open Data Portal</p>
@@ -493,7 +493,7 @@ const baseUrl = '/ckan-mcp-server';
493493
class="portal-card bg-white p-6 border border-gray-200"
494494
>
495495
<div class="flex items-center gap-3 mb-3">
496-
<span class="text-3xl emoji-flag">🇺🇸</span>
496+
<img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f1fa-1f1f8.svg" alt="🇺🇸" class="w-8 h-8" />
497497
<h3 class="display-font text-xl font-semibold text-navy">catalog.data.gov</h3>
498498
</div>
499499
<p class="text-sm text-gray-600">United States Open Data</p>
@@ -506,7 +506,7 @@ const baseUrl = '/ckan-mcp-server';
506506
class="portal-card bg-white p-6 border border-gray-200"
507507
>
508508
<div class="flex items-center gap-3 mb-3">
509-
<span class="text-3xl emoji-flag">🇨🇦</span>
509+
<img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f1e8-1f1e6.svg" alt="🇨🇦" class="w-8 h-8" />
510510
<h3 class="display-font text-xl font-semibold text-navy">open.canada.ca</h3>
511511
</div>
512512
<p class="text-sm text-gray-600">Canada Open Government</p>
@@ -519,7 +519,7 @@ const baseUrl = '/ckan-mcp-server';
519519
class="portal-card bg-white p-6 border border-gray-200"
520520
>
521521
<div class="flex items-center gap-3 mb-3">
522-
<span class="text-3xl emoji-flag">🇦🇺</span>
522+
<img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f1e6-1f1fa.svg" alt="🇦🇺" class="w-8 h-8" />
523523
<h3 class="display-font text-xl font-semibold text-navy">data.gov.au</h3>
524524
</div>
525525
<p class="text-sm text-gray-600">Australian Government Open Data</p>
@@ -532,7 +532,7 @@ const baseUrl = '/ckan-mcp-server';
532532
class="portal-card bg-white p-6 border border-gray-200"
533533
>
534534
<div class="flex items-center gap-3 mb-3">
535-
<span class="text-3xl emoji-flag">🇬🇧</span>
535+
<img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f1ec-1f1e7.svg" alt="🇬🇧" class="w-8 h-8" />
536536
<h3 class="display-font text-xl font-semibold text-navy">data.gov.uk</h3>
537537
</div>
538538
<p class="text-sm text-gray-600">United Kingdom Open Data</p>
@@ -545,7 +545,7 @@ const baseUrl = '/ckan-mcp-server';
545545
class="portal-card bg-white p-6 border border-gray-200"
546546
>
547547
<div class="flex items-center gap-3 mb-3">
548-
<span class="text-3xl emoji-flag">🇨🇭</span>
548+
<img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f1e8-1f1ed.svg" alt="🇨🇭" class="w-8 h-8" />
549549
<h3 class="display-font text-xl font-semibold text-navy">opendata.swiss</h3>
550550
</div>
551551
<p class="text-sm text-gray-600">Swiss Open Data Portal</p>

website/src/styles/global.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,5 @@
99
}
1010

1111
@layer utilities {
12-
.emoji-flag {
13-
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", "Segoe UI Symbol",
14-
sans-serif;
15-
font-variant-emoji: emoji;
16-
line-height: 1;
17-
}
12+
/* Removed .emoji-flag - now using SVG images instead */
1813
}

0 commit comments

Comments
 (0)