web: lab font file version

This commit is contained in:
Rasmus Andersson 2020-08-20 11:07:25 -07:00
parent 1cd1e1a148
commit e8fd39993c

View file

@ -59,11 +59,11 @@ var fontFamilyName,
w(` font-display: block;`)
w(` src:`)
if (includeLabLocalFiles) {
w(` url("fonts/${filepath}/${filename}.woff2") format("woff2"),`)
w(` url("fonts/${filepath}/${filename}.woff") format("woff"),`)
w(` url("fonts/${filepath}/${filename}.woff2?v=${fontVersion}") format("woff2"),`)
w(` url("fonts/${filepath}/${filename}.woff?v=${fontVersion}") format("woff"),`)
}
w(` url("../font-files/${filename}.woff2") format("woff2"),`)
w(` url("../font-files/${filename}.woff") format("woff2");`)
w(` url("../font-files/${filename}.woff2?v=${fontVersion}") format("woff2"),`)
w(` url("../font-files/${filename}.woff?v=${fontVersion}") format("woff2");`)
w(`}`)
}
@ -93,9 +93,9 @@ var fontFamilyName,
font-display: block;
src:`)
if (includeLabLocalFiles) {
w(` url('fonts/var/${family}.var.woff2') format("woff2-variations"),`)
w(` url('fonts/var/${family}.var.woff2?v=${fontVersion}') format("woff2"),`)
}
w(` url('../font-files/${family}.var.woff2') format("woff2-variations");`)
w(` url('../font-files/${family}.var.woff2?v=${fontVersion}') format("woff2");`)
w(`}`)
w(`@font-face {
@ -104,9 +104,9 @@ var fontFamilyName,
font-display: block;
src:`)
if (includeLabLocalFiles) {
w(` url('fonts/var/${family}.var.woff2') format("woff2-variations"),`)
w(` url('fonts/var/${family}.var.woff2?v=${fontVersion}') format("woff2"),`)
}
w(` url('../font-files/${family}.var.woff2') format("woff2-variations");`)
w(` url('../font-files/${family}.var.woff2?v=${fontVersion}') format("woff2");`)
w(`}`)
}