1
1
mirror of https://github.com/rsms/inter.git synced 2024-12-25 08:33:40 +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 // not exposed in UI as it only works when serving the site locally
// with fonts in the build/fonts directory. // with fonts in the build/fonts directory.
const hinted = location.search.indexOf('hinted=1') != -1 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 { class BoundVar {
constructor(name, e, valueGetter, valueSetter, parentVars) { constructor(name, e, valueGetter, valueSetter, parentVars) {