Skip to content

Commit

Permalink
Merge pull request #7 from sern-handler/fix/locale-emojis
Browse files Browse the repository at this point in the history
fix: language selector not showing emojis on windows
  • Loading branch information
jacoobes authored Sep 17, 2023
2 parents 3d7161e + 3301b99 commit 8199672
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap" rel="stylesheet">
</head>
<body>
<div id="root"></div>
Expand Down
7 changes: 0 additions & 7 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap');

/* @font-face {
font-family: 'Classic Console Neue';
src: local('Classic Console Neue'),
url('https://fonts.srizan.dev/clacon2.ttf') format('truetype');
} */

.titleHeader {
color: #4af626;
font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
Expand All @@ -17,6 +11,5 @@
gap: 30px;
padding: 20px;
align-items: center;
display: 'grid';
grid-template-columns: repeat(2, 1fr);
}
2 changes: 2 additions & 0 deletions src/LanguageSelector.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');

.languageSelector {
position: absolute;
top: 15px;
Expand Down
9 changes: 5 additions & 4 deletions src/LanguageSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ export default function LanguageSelector() {
height: '40px',
textAlign: 'center',
// this fixes a little text selection gap that appears in a
// few pixels outside the outer part of the selection "square"
cursor: 'pointer'
// few pixels outside the outer part of the selection outline
cursor: 'pointer',
fontFamily: 'Noto Color Emoji'
}}
>
<MenuItem value={'en'} className={'menuItems'}>🇺🇸</MenuItem>
<MenuItem value={'es'} className={'menuItems'}>🇪🇸</MenuItem>
<MenuItem value={'en'} className={'menuItems'} sx={{ fontFamily: 'Noto Color Emoji' }}>🇺🇸</MenuItem>
<MenuItem value={'es'} className={'menuItems'} sx={{ fontFamily: 'Noto Color Emoji' }}>🇪🇸</MenuItem>
</Select>
</FormControl>
</div>
Expand Down

0 comments on commit 8199672

Please sign in to comment.