|
1 | | -<link rel="dns-prefetch" href="https://cppalliance.org"> |
2 | | -<link rel="preconnect" href="https://cppalliance.org" crossorigin> |
3 | | -<link rel="preload" href="https://cppalliance.org/fonts/NotoSansDisplay.ttf" as="font" type="font/ttf" crossorigin fetchpriority="high" /> |
4 | | -<link rel="preload" href="https://cppalliance.org/fonts/NotoSansDisplay-Italic.ttf" as="font" type="font/ttf" crossorigin fetchpriority="high" /> |
5 | | -<link rel="preload" href="https://cppalliance.org/fonts/NotoSansMono.ttf" as="font" type="font/ttf" crossorigin fetchpriority="high" /> |
| 1 | +<link rel="preload" href="{{{uiRootPath}}}/font/NotoSansDisplay.ttf" as="font" type="font/ttf" fetchpriority="high" /> |
| 2 | +<link rel="preload" href="{{{uiRootPath}}}/font/NotoSansDisplay-Italic.ttf" as="font" type="font/ttf" |
| 3 | + fetchpriority="high" /> |
| 4 | +<link rel="preload" href="{{{uiRootPath}}}/font/NotoSansMono.ttf" as="font" type="font/ttf" fetchpriority="high" /> |
6 | 5 | <script> |
7 | 6 | (function() { |
8 | 7 | 'use strict'; |
|
11 | 10 | document.documentElement.style.visibility = 'hidden'; |
12 | 11 | |
13 | 12 | var fontUrls = [ |
14 | | - { family: 'Noto Sans', url: 'https://cppalliance.org/fonts/NotoSansDisplay.ttf', style: 'normal' }, |
15 | | - { family: 'Noto Sans', url: 'https://cppalliance.org/fonts/NotoSansDisplay-Italic.ttf', style: 'italic' }, |
16 | | - { family: 'Noto Sans Mono', url: 'https://cppalliance.org/fonts/NotoSansMono.ttf', style: 'normal' } |
| 13 | + { family: 'Noto Sans', url: '{{{uiRootPath}}}/font/NotoSansDisplay.ttf', style: 'normal', weight: '400' }, |
| 14 | + { family: 'Noto Sans', url: '{{{uiRootPath}}}/font/NotoSansDisplay.ttf', style: 'normal', weight: '600' }, |
| 15 | + { family: 'Noto Sans', url: '{{{uiRootPath}}}/font/NotoSansDisplay-Italic.ttf', style: 'italic', weight: '400' }, |
| 16 | + { family: 'Noto Sans Mono', url: '{{{uiRootPath}}}/font/NotoSansMono.ttf', style: 'normal', weight: '400' } |
17 | 17 | ]; |
18 | 18 | |
19 | 19 | var fontPromises = fontUrls.map(function(fontConfig) { |
20 | 20 | var fontFace = new FontFace(fontConfig.family, 'url(' + fontConfig.url + ')', { |
21 | | - style: fontConfig.style |
| 21 | + style: fontConfig.style, |
| 22 | + weight: fontConfig.weight |
22 | 23 | }); |
23 | 24 | return fontFace.load().then(function(loadedFont) { |
24 | 25 | document.fonts.add(loadedFont); |
|
0 commit comments