diff options
-rw-r--r-- | docs/_includes/preload-font-files.html | 4 | ||||
-rw-r--r-- | docs/inter.css | 82 | ||||
-rw-r--r-- | docs/lab/index.html | 6 | ||||
-rwxr-xr-x | misc/tools/versionize.py | 5 |
4 files changed, 49 insertions, 48 deletions
diff --git a/docs/_includes/preload-font-files.html b/docs/_includes/preload-font-files.html index 8e63ac0d9..cbeaab35c 100644 --- a/docs/_includes/preload-font-files.html +++ b/docs/_includes/preload-font-files.html @@ -5,5 +5,5 @@ assign url_root = "/" %}{% else %}{% assign url_root = "/inter/" %}{% endif %}{% assign font_v = site.data.fontinfo[0].version -%}<link rel="preload" href="{{url_root}}font-files/Inter-roman.var.woff2?v=3.15" as="font" type="font/woff2" crossorigin="anonymous"> - <link rel="preload" href="{{url_root}}font-files/Inter-italic.var.woff2?v=3.15" as="font" type="font/woff2" crossorigin="anonymous">
\ No newline at end of file +%}<link rel="preload" href="{{url_root}}font-files/Inter-roman.var.woff2?v={{font_v}}" as="font" type="font/woff2" crossorigin="anonymous"> + <link rel="preload" href="{{url_root}}font-files/Inter-italic.var.woff2?v={{font_v}}" as="font" type="font/woff2" crossorigin="anonymous">
\ No newline at end of file diff --git a/docs/inter.css b/docs/inter.css index 0f8230049..6d14d03ab 100644 --- a/docs/inter.css +++ b/docs/inter.css @@ -7,16 +7,16 @@ layout: none font-style: normal; font-weight: 100; font-display: swap; - src: url("font-files/Inter-Thin.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-Thin.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-Thin.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-Thin.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 100; font-display: swap; - src: url("font-files/Inter-ThinItalic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-ThinItalic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-ThinItalic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-ThinItalic.woff?v={{font_v}}") format("woff"); } @font-face { @@ -24,16 +24,16 @@ layout: none font-style: normal; font-weight: 200; font-display: swap; - src: url("font-files/Inter-ExtraLight.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-ExtraLight.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-ExtraLight.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-ExtraLight.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 200; font-display: swap; - src: url("font-files/Inter-ExtraLightItalic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-ExtraLightItalic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-ExtraLightItalic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-ExtraLightItalic.woff?v={{font_v}}") format("woff"); } @font-face { @@ -41,16 +41,16 @@ layout: none font-style: normal; font-weight: 300; font-display: swap; - src: url("font-files/Inter-Light.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-Light.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-Light.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-Light.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 300; font-display: swap; - src: url("font-files/Inter-LightItalic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-LightItalic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-LightItalic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-LightItalic.woff?v={{font_v}}") format("woff"); } @font-face { @@ -58,16 +58,16 @@ layout: none font-style: normal; font-weight: 400; font-display: swap; - src: url("font-files/Inter-Regular.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-Regular.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-Regular.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-Regular.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 400; font-display: swap; - src: url("font-files/Inter-Italic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-Italic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-Italic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-Italic.woff?v={{font_v}}") format("woff"); } @font-face { @@ -75,16 +75,16 @@ layout: none font-style: normal; font-weight: 500; font-display: swap; - src: url("font-files/Inter-Medium.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-Medium.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-Medium.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-Medium.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 500; font-display: swap; - src: url("font-files/Inter-MediumItalic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-MediumItalic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-MediumItalic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-MediumItalic.woff?v={{font_v}}") format("woff"); } @font-face { @@ -92,16 +92,16 @@ layout: none font-style: normal; font-weight: 600; font-display: swap; - src: url("font-files/Inter-SemiBold.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-SemiBold.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-SemiBold.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-SemiBold.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 600; font-display: swap; - src: url("font-files/Inter-SemiBoldItalic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-SemiBoldItalic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-SemiBoldItalic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-SemiBoldItalic.woff?v={{font_v}}") format("woff"); } @font-face { @@ -109,16 +109,16 @@ layout: none font-style: normal; font-weight: 700; font-display: swap; - src: url("font-files/Inter-Bold.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-Bold.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-Bold.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-Bold.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 700; font-display: swap; - src: url("font-files/Inter-BoldItalic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-BoldItalic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-BoldItalic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-BoldItalic.woff?v={{font_v}}") format("woff"); } @font-face { @@ -126,16 +126,16 @@ layout: none font-style: normal; font-weight: 800; font-display: swap; - src: url("font-files/Inter-ExtraBold.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-ExtraBold.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-ExtraBold.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-ExtraBold.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 800; font-display: swap; - src: url("font-files/Inter-ExtraBoldItalic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-ExtraBoldItalic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-ExtraBoldItalic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-ExtraBoldItalic.woff?v={{font_v}}") format("woff"); } @font-face { @@ -143,16 +143,16 @@ layout: none font-style: normal; font-weight: 900; font-display: swap; - src: url("font-files/Inter-Black.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-Black.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-Black.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-Black.woff?v={{font_v}}") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 900; font-display: swap; - src: url("font-files/Inter-BlackItalic.woff2?{{font_v}}") format("woff2"), - url("font-files/Inter-BlackItalic.woff?{{font_v}}") format("woff"); + src: url("font-files/Inter-BlackItalic.woff2?v={{font_v}}") format("woff2"), + url("font-files/Inter-BlackItalic.woff?v={{font_v}}") format("woff"); } /* ------------------------------------------------------- @@ -170,7 +170,7 @@ Usage: font-style: normal; font-named-instance: 'Regular'; font-display: swap; - src: url("font-files/Inter-roman.var.woff2?{{font_v}}") format("woff2"); + src: url("font-files/Inter-roman.var.woff2?v={{font_v}}") format("woff2"); } @font-face { font-family: 'Inter var'; @@ -178,7 +178,7 @@ Usage: font-style: italic; font-named-instance: 'Italic'; font-display: swap; - src: url("font-files/Inter-italic.var.woff2?{{font_v}}") format("woff2"); + src: url("font-files/Inter-italic.var.woff2?v={{font_v}}") format("woff2"); } /* Legacy naming compatibility */ @@ -188,7 +188,7 @@ Usage: font-style: normal; font-named-instance: 'Regular'; font-display: swap; - src: url("font-files/Inter-roman.var.woff2?{{font_v}}") format("woff2"); + src: url("font-files/Inter-roman.var.woff2?v={{font_v}}") format("woff2"); } @font-face { font-family: 'Inter var alt'; @@ -196,7 +196,7 @@ Usage: font-style: italic; font-named-instance: 'Italic'; font-display: swap; - src: url("font-files/Inter-italic.var.woff2?{{font_v}}") format("woff2"); + src: url("font-files/Inter-italic.var.woff2?v={{font_v}}") format("woff2"); } @@ -218,5 +218,5 @@ explicitly, e.g. font-weight: 100 900; font-style: oblique 0deg 10deg; font-display: swap; - src: url("font-files/Inter.var.woff2?{{font_v}}") format("woff2"); + src: url("font-files/Inter.var.woff2?v={{font_v}}") format("woff2"); } diff --git a/docs/lab/index.html b/docs/lab/index.html index 22f6acd14..108e8d217 100644 --- a/docs/lab/index.html +++ b/docs/lab/index.html @@ -26,9 +26,9 @@ if (window.matchMedia('(prefers-color-scheme: dark)').matches) { } })(navigator.userAgent); </script> - <script type="text/javascript" src="samples.js"></script> - <script type="text/javascript" src="build-version.js"></script> - <script type="text/javascript" src="font-files.js"></script> + <script type="text/javascript" src="samples.js?v=3.15"></script> + <script type="text/javascript" src="build-version.js?v=3.15"></script> + <script type="text/javascript" src="font-files.js?v=3.15"></script> <link href="lab.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i,900,900i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese"> </head> diff --git a/misc/tools/versionize.py b/misc/tools/versionize.py index 3d67e259e..25ba063bb 100755 --- a/misc/tools/versionize.py +++ b/misc/tools/versionize.py @@ -24,7 +24,7 @@ def updateCSSFile(filename): def updateHTMLFile(filename): - regex = re.compile(r'(href="[^"]+?v=)([^"]+)(")') + regex = re.compile(r'((?:href|src)="[^"]+?v=)([^"]+)(")') with open(filename, 'r') as f: s = f.read() s = regex.sub(lambda m: '%s%s%s' % (m.group(1), version, m.group(3)), s) @@ -33,7 +33,8 @@ def updateHTMLFile(filename): updateCSSFile(pjoin(BASEDIR, 'misc', 'dist', 'inter.css')) -updateHTMLFile(pjoin(BASEDIR, 'docs', '_includes', 'preload-font-files.html')) +# updateHTMLFile(pjoin(BASEDIR, 'docs', '_includes', 'preload-font-files.html')) +updateHTMLFile(pjoin(BASEDIR, 'docs', 'lab', 'index.html')) # Note: The website CSS file uses Jekyll variables to add ?v= so don't need this anymore. # updateCSSFile(pjoin(BASEDIR, 'docs', 'inter.css')) |