1
1
mirror of https://github.com/rsms/inter.git synced 2024-12-23 23:51:39 +03:00

website: fix hinted=1 flag on lab when running locally for using hinted font files

This commit is contained in:
Rasmus Andersson 2019-04-04 17:30:34 -07:00
parent 1b2c4c32c2
commit 24839de654

View File

@ -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) {