Skip to content

Commit abb74ad

Browse files
committed
feat(ui): switch monospace font from JetBrains Mono to Maple Mono via CDN
- Load Maple Mono variable font (woff2) from jsDelivr CDN with @font-face - Enable ligatures (calt, liga, zero) on all monospace elements - Replace JetBrains Mono/Google Fonts link with Maple Mono across code blocks, inline-code, kbd and hero terminal
1 parent 122a087 commit abb74ad

4 files changed

Lines changed: 27 additions & 12 deletions

File tree

index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
} catch (e) { }
3434
})();
3535
</script>
36-
<link rel="preconnect" href="https://fonts.googleapis.com" />
37-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
38-
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet" />
36+
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
3937
<title>Fcitx5 Lotus | Bộ gõ tiếng Việt cho Linux</title>
4038
</head>
4139

src/assets/shared.css

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
--max-width: 1200px;
33
}
44

5+
@font-face {
6+
font-family: 'Maple Mono';
7+
src: url('https://cdn.jsdelivr.net/gh/subframe7536/maple-font@v7.9/woff2/var/MapleMono[wght]-VF.woff2') format('woff2-variations');
8+
font-weight: 100 900;
9+
font-display: swap;
10+
}
11+
512
:root[data-theme='latte'] {
613
color-scheme: light;
714
--ctp-base: #eff1f5;
@@ -402,7 +409,7 @@ section {
402409
color: var(--ctp-text);
403410
padding: 2px 6px;
404411
border-radius: 4px;
405-
font-family: monospace;
412+
font-family: 'Maple Mono', monospace;
406413
font-size: 0.9em;
407414
transition:
408415
background-color 0.3s,
@@ -425,7 +432,7 @@ section {
425432
.code-block pre {
426433
margin: 0;
427434
color: var(--ctp-text);
428-
font-family: monospace;
435+
font-family: 'Maple Mono', monospace;
429436
font-size: 0.875rem;
430437
white-space: pre-wrap;
431438
word-wrap: break-word;
@@ -560,7 +567,7 @@ section {
560567
border: 1px solid var(--ctp-surface2);
561568
border-radius: 4px;
562569
border-bottom-width: 2px;
563-
font-family: monospace;
570+
font-family: 'Maple Mono', monospace;
564571
font-size: 0.85rem;
565572
color: var(--ctp-text);
566573
transition: all 0.3s;
@@ -591,7 +598,7 @@ section {
591598

592599
.uninstall-card .code-container pre {
593600
margin: 0;
594-
font-family: 'JetBrains Mono', monospace;
601+
font-family: 'Maple Mono', monospace;
595602
font-size: 0.9rem;
596603
color: var(--ctp-text);
597604
white-space: pre-wrap;
@@ -930,4 +937,14 @@ section {
930937

931938
:root .el-button--primary:hover {
932939
opacity: 0.9;
940+
}
941+
942+
pre,
943+
code,
944+
.inline-code,
945+
.kbd-key,
946+
.term-body,
947+
.term-title,
948+
.typing {
949+
font-feature-settings: 'calt', 'liga', 'zero';
933950
}

src/components/HeroSection.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,13 @@ onUnmounted(() => {
308308
flex: 1;
309309
text-align: center;
310310
color: var(--ctp-subtext0);
311-
font-family: monospace;
311+
font-family: 'Maple Mono', monospace;
312312
font-size: 0.75rem;
313313
}
314314
315315
.term-body {
316316
padding: 24px;
317-
font-family: monospace;
317+
font-family: 'Maple Mono', monospace;
318318
font-size: 0.875rem;
319319
color: var(--ctp-text);
320320
line-height: 1.6;
@@ -334,7 +334,7 @@ onUnmounted(() => {
334334
align-items: center;
335335
min-height: 1.2em;
336336
color: var(--ctp-text);
337-
font-family: monospace;
337+
font-family: 'Maple Mono', monospace;
338338
}
339339
340340
@keyframes blink {

src/components/InteractiveInstaller.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,14 +778,14 @@ pre {
778778
margin: 0;
779779
white-space: pre-wrap;
780780
word-break: break-all;
781-
font-family: 'JetBrains Mono', monospace;
781+
font-family: 'Maple Mono', monospace;
782782
font-size: 0.95rem;
783783
line-height: 1.6;
784784
color: var(--ctp-text);
785785
}
786786
787787
code {
788-
font-family: 'JetBrains Mono', monospace;
788+
font-family: 'Maple Mono', monospace;
789789
font-size: 0.9rem;
790790
}
791791

0 commit comments

Comments
 (0)