Skip to content

Commit 0c8c796

Browse files
committed
chore: remove render blocking font request
1 parent 229633c commit 0c8c796

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

index.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
<!-- Google Fonts with optimizations -->
3535
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
3636
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
37-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
3837

3938
<!-- Preload main script -->
4039
<link rel="modulepreload" href="/src/main.tsx">
@@ -43,6 +42,17 @@
4342
<div id="root"></div>
4443
<script type="module" src="/src/main.tsx"></script>
4544

45+
<!-- Load Inter font after page load to prevent render blocking -->
46+
<script>
47+
window.addEventListener('load', function() {
48+
// Load Inter font asynchronously
49+
const fontLink = document.createElement('link');
50+
fontLink.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap';
51+
fontLink.rel = 'stylesheet';
52+
document.head.appendChild(fontLink);
53+
});
54+
</script>
55+
4656
<!-- Defer Google Analytics to not block rendering -->
4757
<script>
4858
window.addEventListener('load', function() {

src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const AppContainer = styled.div`
99
margin: 0;
1010
padding: 0;
1111
background-color: #000;
12-
font-family: 'Inter', sans-serif;
12+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
1313
font-weight: 400;
1414
font-size: 16px;
1515
overflow-x: hidden;
@@ -138,7 +138,7 @@ const ConfigArea = styled.div`
138138
min-height: 100px;
139139
padding: 40px;
140140
color: #555555;
141-
font-family: 'Inter', sans-serif;
141+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
142142
font-weight: 400;
143143
144144
.filter-section {
@@ -151,7 +151,7 @@ const ConfigArea = styled.div`
151151
padding: 8px 12px;
152152
border: 1px solid #ccc;
153153
border-radius: 4px;
154-
font-family: 'Inter', sans-serif;
154+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
155155
}
156156
}
157157

0 commit comments

Comments
 (0)