From 24839de654aba991c7c904f67a40540564f0f460 Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Thu, 4 Apr 2019 17:30:34 -0700 Subject: [PATCH] website: fix hinted=1 flag on lab when running locally for using hinted font files --- docs/lab/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/lab/index.html b/docs/lab/index.html index 978b4d6a0..7a42decee 100644 --- a/docs/lab/index.html +++ b/docs/lab/index.html @@ -1598,8 +1598,12 @@ document.head.appendChild(fontCSS) // not exposed in UI as it only works when serving the site locally // with fonts in the build/fonts directory. const hinted = location.search.indexOf('hinted=1') != -1 +const familyName = hinted ? fontFamilyNameHinted : fontFamilyName; -document.body.style.fontFamily = hinted ? fontFamilyNameHinted : fontFamilyName; +if (hinted) { + document.body.classList.add('hinted') +} +document.body.style.fontFamily = familyName class BoundVar { constructor(name, e, valueGetter, valueSetter, parentVars) {