diff options
author | Rasmus Andersson <rasmus@figma.com> | 2019-04-05 03:30:34 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@figma.com> | 2019-04-05 03:30:34 +0300 |
commit | 24839de654aba991c7c904f67a40540564f0f460 (patch) | |
tree | 6a88b265201e2d950b3d60dd07771cc7d32a27fb /docs/lab | |
parent | 1b2c4c32c2de52fc512f754ae38ad96234530db9 (diff) | |
download | inter-24839de654aba991c7c904f67a40540564f0f460.tar.xz |
website: fix hinted=1 flag on lab when running locally for using hinted font files
Diffstat (limited to 'docs/lab')
-rw-r--r-- | docs/lab/index.html | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |