From 46463c8348bb561c7662fa2609565e73bfde30a3 Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Wed, 21 Jul 2021 23:46:20 +0800 Subject: [PATCH] feat: use source sans instead of noto for default fonts --- src/_blocks.scss | 2 +- src/_fonts.scss | 29 ++++++++++++++++++----------- src/_miscs.scss | 2 +- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/_blocks.scss b/src/_blocks.scss index ce3ac82..f39be0e 100644 --- a/src/_blocks.scss +++ b/src/_blocks.scss @@ -163,7 +163,7 @@ div.items-center::after, content: ""; top: 1em; bottom: 0; - left: -16px; + left: -17px; position: absolute; border-left: 2px solid transparent; } diff --git a/src/_fonts.scss b/src/_fonts.scss index 3594813..9b06813 100644 --- a/src/_fonts.scss +++ b/src/_fonts.scss @@ -1,21 +1,28 @@ -@import url("https://fonts.googleapis.com/css2?family=Fira+Code&family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Fira+Code"); +@import url("https://cdn.jsdelivr.net/gh/adobe-fonts/source-sans@3.046R/source-sans-3VF.css"); + +// Custom Source Han Sans VF fonts for Simplified Chinese +@font-face{ + font-family: 'Source Han Sans VF'; + font-weight: 200 900; + font-style: normal; + font-stretch: normal; + // The following is 17MB even after compression + src: url('https://cdn.jsdelivr.net/gh/adobe-fonts/source-han-sans@2.003R/Variable/Subset/SourceHanSansCN-VF.otf'); +} :root { - --ct-text-size: 15px; + --ct-text-size: 16px; --ct-line-height: 1.5; - --ls-font-family: "Noto Sans", "Noto Sans SC", ui-sans-serif, system-ui, - -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", - Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", - "Segoe UI Symbol", "Noto Color Emoji"; - --ct-page-title-font-family: "Noto Sans SC", ui-sans-serif, system-ui, - -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", - Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", - "Segoe UI Symbol", "Noto Color Emoji"; + --ls-font-family: "Source Sans 3 VF", "Source Han Sans VF", ui-sans-serif, + system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --ct-page-title-font-family: var(--ls-font-family); --ct-code-font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } - html, body { font-size: var(--ct-text-size); diff --git a/src/_miscs.scss b/src/_miscs.scss index e537c03..be733d0 100644 --- a/src/_miscs.scss +++ b/src/_miscs.scss @@ -7,7 +7,6 @@ /* lists */ ol > li::marker { - font-family: Asap; font-weight: 600; font-variant-numeric: tabular-nums; } @@ -28,6 +27,7 @@ ol > li::marker { b, strong { color: var(--ct-bold-color); + font-weight: 600; } /* External links */