Skip to content

Commit a791176

Browse files
committed
Prioritize local fonts for antora bundles
Add local font paths first in @font-face src to check for fonts in antora-bundled projects before remote fallbacks. Required before boostorg/website-v2-docs#545 can merge.
1 parent c8ea8e2 commit a791176

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

boostlook.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,8 @@ html:has(.boostlook) {
726726
/* Variable font weight range */
727727
font-variation-settings: "wght" 400, "wdth" 62.5;
728728
font-display: swap;
729-
src: url("/static/font/notosans.woff2") format("woff2"),
729+
src: url("../font/NotoSansDisplay.ttf") format("truetype"),
730+
url("/static/font/notosans.woff2") format("woff2"),
730731
url("../../../../tools/boostlook/notosans.woff2") format("woff2"),
731732
url("https://cppalliance.org/fonts/NotoSansDisplay.ttf") format("truetype");
732733
/* Metric overrides to reduce CLS on swap */
@@ -745,7 +746,8 @@ html:has(.boostlook) {
745746
/* Variable font weight range */
746747
font-variation-settings: "wght" 400, "wdth" 62.5;
747748
font-display: swap;
748-
src: url("/static/font/notosans_ext.woff2") format("woff2"),
749+
src: url("../font/NotoSansDisplay-Italic.ttf") format("truetype"),
750+
url("/static/font/notosans_ext.woff2") format("woff2"),
749751
url("../../../../tools/boostlook/notosans_ext.woff2") format("woff2"),
750752
url("https://cppalliance.org/fonts/NotoSansDisplay-Italic.ttf") format("truetype");
751753
/* Metric overrides to reduce CLS on swap */
@@ -764,7 +766,8 @@ html:has(.boostlook) {
764766
/* Variable font weight range */
765767
font-variation-settings: "wght" 400, "wdth" 62.5;
766768
font-display: swap;
767-
src: url("/static/font/notosans_mono.woff") format("woff"),
769+
src: url("../font/NotoSansMono.ttf") format("truetype"),
770+
url("/static/font/notosans_mono.woff") format("woff"),
768771
url("../../../../tools/boostlook/notosans_mono.woff") format("woff"),
769772
url("https://cppalliance.org/fonts/NotoSansMono.ttf") format("truetype");
770773
/* Metric overrides to reduce CLS on swap */
@@ -782,7 +785,8 @@ html:has(.boostlook) {
782785
/* Fixed weight for specific use cases */
783786
font-stretch: 62.5% 100%;
784787
font-display: swap;
785-
src: url("/static/font/notosans_mono.woff") format("woff"),
788+
src: url("../font/NotoSansMono.ttf") format("truetype"),
789+
url("/static/font/notosans_mono.woff") format("woff"),
786790
url("../../../../tools/boostlook/notosans_mono.woff") format("woff"),
787791
url("https://cppalliance.org/fonts/NotoSansMono.ttf") format("truetype");
788792
/* Metric overrides to reduce CLS on swap */

0 commit comments

Comments
 (0)