Skip to content

Commit 9bd6081

Browse files
Fix: Apply Nasalization font to headings
Ensures the Nasalization font is correctly applied to all heading elements.
1 parent b6736e0 commit 9bd6081

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

index.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1313
<link rel="preconnect" href="https://fonts.cdnfonts.com" crossorigin />
1414

15-
<!-- Preload Nasalization Font -->
15+
<!-- Preload Nasalization Font with high priority -->
1616
<link rel="preload" href="https://fonts.cdnfonts.com/s/35587/nasalization-rg.ttf" as="font" type="font/ttf" crossorigin="anonymous" />
1717

18-
<!-- Font Stylesheets -->
18+
<!-- Font Stylesheets - Direct import without @import -->
1919
<link href="https://fonts.cdnfonts.com/css/nasalization" rel="stylesheet">
2020
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Exo:wght@300;400;500;600;700&display=swap" />
2121

@@ -36,12 +36,12 @@
3636
<!-- Favicon -->
3737
<link rel="icon" href="/lovable-uploads/ALogo.png" type="image/x-icon" />
3838

39-
<!-- Critical Font CSS to prioritize Nasalization font loading -->
39+
<!-- Critical Font CSS inlined to ensure Nasalization loads first -->
4040
<style>
4141
@font-face {
4242
font-family: 'Nasalization';
4343
src: url('https://fonts.cdnfonts.com/s/35587/nasalization-rg.ttf') format('truetype');
44-
font-weight: normal;
44+
font-weight: 400;
4545
font-style: normal;
4646
font-display: swap;
4747
}
@@ -50,12 +50,15 @@
5050
.font-nasalization {
5151
font-family: 'Nasalization', sans-serif !important;
5252
font-weight: 400;
53+
letter-spacing: 0.5px;
5354
}
5455

5556
/* Remove all references to atomic-force */
56-
.font-atomic-force {
57+
body * .font-atomic-force,
58+
body * .font-atomic {
5759
font-family: 'Nasalization', sans-serif !important;
5860
font-weight: 400;
61+
letter-spacing: 0.5px;
5962
}
6063
</style>
6164
</head>

src/global.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ main {
5555
box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
5656
}
5757

58-
/* Nasalization font configuration - fixed path and format */
58+
/* Direct font-face declarations with fixed path and format */
5959
@font-face {
6060
font-family: 'Nasalization';
6161
font-style: normal;
@@ -64,14 +64,14 @@ main {
6464
src: url('https://fonts.cdnfonts.com/s/35587/nasalization-rg.ttf') format('truetype');
6565
}
6666

67-
/* Apply font to all headings */
67+
/* Apply font to all headings with !important to enforce */
6868
h1, h2, h3, h4, h5, h6 {
6969
font-family: 'Nasalization', sans-serif !important;
7070
letter-spacing: 0.5px;
7171
font-weight: 400;
7272
}
7373

74-
/* Font class standardization - use only 'font-nasalization' */
74+
/* Standardize font class - use only 'font-nasalization' */
7575
.font-nasalization {
7676
font-family: 'Nasalization', sans-serif !important;
7777
font-weight: 400 !important;
@@ -80,8 +80,9 @@ h1, h2, h3, h4, h5, h6 {
8080
white-space: nowrap !important; /* Keep text in one line */
8181
}
8282

83-
/* Maintain backward compatibility but phase out atomic-force */
84-
.font-atomic-force {
83+
/* Legacy support - convert all instances to Nasalization */
84+
.font-atomic-force,
85+
.font-atomic {
8586
font-family: 'Nasalization', sans-serif !important;
8687
font-weight: 400 !important;
8788
font-style: normal !important;

src/index.css

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
@import url('https://fonts.googleapis.com/css2?family=Exo:wght@300;400;500;600;700&display=swap');
2-
@import url('https://fonts.cdnfonts.com/css/nasalization');
31

42
@tailwind base;
53
@tailwind components;
64
@tailwind utilities;
75

6+
/* Direct font loading - no @import to ensure better loading */
7+
@font-face {
8+
font-family: 'Nasalization';
9+
font-style: normal;
10+
font-weight: 400;
11+
font-display: swap;
12+
src: url('https://fonts.cdnfonts.com/s/35587/nasalization-rg.ttf') format('truetype');
13+
}
14+
815
@layer base {
916
:root {
1017
--background: 240 33% 5%;
@@ -47,7 +54,7 @@
4754
--sidebar-ring: 48 83% 72%;
4855
}
4956

50-
/* Primary font declarations */
57+
/* Primary font declarations with !important to override any other styles */
5158
h1, h2, h3, h4, h5, h6 {
5259
font-family: 'Nasalization', sans-serif !important;
5360
font-weight: 400;
@@ -57,23 +64,15 @@
5764
font-family: 'Exo', system-ui, sans-serif;
5865
}
5966

60-
/* Direct font-face declaration to ensure Nasalization is loaded */
61-
@font-face {
62-
font-family: 'Nasalization';
63-
font-style: normal;
64-
font-weight: 400;
65-
font-display: swap;
66-
src: url('https://fonts.cdnfonts.com/s/35587/nasalization-rg.ttf') format('truetype');
67-
}
68-
6967
/* Standard class for Nasalization font */
7068
.font-nasalization {
7169
font-family: 'Nasalization', sans-serif !important;
7270
font-weight: 400 !important;
7371
}
7472

75-
/* Legacy support but all components should transition to font-nasalization */
76-
.font-atomic-force {
73+
/* Convert all atomic-force references to nasalization */
74+
.font-atomic-force,
75+
.font-atomic {
7776
font-family: 'Nasalization', sans-serif !important;
7877
font-weight: 400 !important;
7978
}
@@ -221,11 +220,7 @@
221220
}
222221
}
223222

224-
/* Additional corrections */
225-
.font-atomic {
226-
font-family: 'Nasalization', sans-serif !important;
227-
}
228-
223+
/* Additional corrections for font consistency */
229224
.section-center {
230225
display: flex;
231226
flex-direction: column;

0 commit comments

Comments
 (0)