File tree Expand file tree Collapse file tree 5 files changed +20
-1
lines changed
Expand file tree Collapse file tree 5 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 2121 "@vercel/speed-insights" : " ^1.3.1" ,
2222 "axios" : " ^1.7.2" ,
2323 "countries-list" : " ^3.1.1" ,
24+ "country-flag-emoji-polyfill" : " ^0.1.8" ,
2425 "date-fns" : " ^2.30.0" ,
2526 "date-fns-tz" : " ^2.0.0" ,
2627 "export-to-csv" : " ^1.3.0" ,
Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ export enum ThemeModeEnum {
5656}
5757
5858export const fontFamily = {
59- primary : 'var(--font-mulish)' ,
59+ // "Twemoji Country Flags" is loaded via a polyfill (polyfillCountryFlagEmojis in providers.tsx)
60+ // and uses unicode-range: U+1F1E6-1F1FF, so it only applies to flag emoji code points
61+ // and does not affect any other text rendering.
62+ primary : '"Twemoji Country Flags", var(--font-mulish)' ,
6063 secondary : 'var(--font-ibm-plex-mono)' ,
6164} ;
6265
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { type RemoteConfigValues } from './interface/RemoteConfig';
88// Look into this provider and see if it's client blocking. Niche provider might be able to isolate for single use
99import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider' ;
1010import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs' ;
11+ import { polyfillCountryFlagEmojis } from 'country-flag-emoji-polyfill' ;
1112
1213interface ProvidersProps {
1314 children : React . ReactNode ;
@@ -19,6 +20,15 @@ export function Providers({
1920 children,
2021 remoteConfig,
2122} : ProvidersProps ) : React . ReactElement {
23+ // Polyfill country flag emojis for browsers that don't support them natively
24+ // (e.g. Microsoft Edge / Chrome on Windows)
25+ React . useEffect ( ( ) => {
26+ polyfillCountryFlagEmojis (
27+ 'Twemoji Country Flags' ,
28+ '/fonts/TwemojiCountryFlags.woff2' ,
29+ ) ;
30+ } , [ ] ) ;
31+
2232 // Start MSW in mock mode to intercept API calls client-side
2333 React . useEffect ( ( ) => {
2434 if ( process . env . NEXT_PUBLIC_API_MOCKING === 'enabled' ) {
Original file line number Diff line number Diff line change @@ -4994,6 +4994,11 @@ countries-list@^3.1.1:
49944994 resolved "https://registry.yarnpkg.com/countries-list/-/countries-list-3.2.2.tgz#34ded4d3c8ebe715306cb5658c34f73a0c8f01cb"
49954995 integrity sha512-ABJ/RWQBrPWy+hRuZoW+0ooK8p65Eo3WmUZwHm6v4wmfSPznNAKzjy3+UUYrJK2v3182BVsgWxdB6ROidj39kw==
49964996
4997+ country-flag-emoji-polyfill@^0.1.8:
4998+ version "0.1.8"
4999+ resolved "https://registry.yarnpkg.com/country-flag-emoji-polyfill/-/country-flag-emoji-polyfill-0.1.8.tgz#d2cfb23dd2f949b80d83eb9822b613bf62957173"
5000+ integrity sha512-Mbah52sADS3gshUYhK5142gtUuJpHYOXlXtLFI3Ly4RqgkmPMvhX9kMZSTqDM8P7UqtSW99eHKFphhQSGXA3Cg==
5001+
49975002crc-32@^1.2.0:
49985003 version "1.2.2"
49995004 resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff"
You can’t perform that action at this time.
0 commit comments