Skip to content

Commit

Permalink
website: cache bust font-files/InterVariable.ttf used by glyph inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
rsms committed Nov 16, 2024
1 parent abfa193 commit 1ea78b6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/res/glyph-inspector.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
---
layout: none
---
{% include defs.html %}{%
for file in site.static_files %}{%
assign _path = file.path | remove_first: "/inter" %}{%
if _path == "/font-files/InterVariable.ttf" %}{%
assign ttf_timestamp = file.modified_time | date: "%Y%m%d%H%M%S" %}{%
endif %}{%
endfor %}

import fontkit from "./fontkit-2.0.2.js"

const { min, max, ceil, floor } = Math
Expand Down Expand Up @@ -962,5 +973,5 @@ class GlyphInspector {
}

let inspector = new GlyphInspector()
await inspector.loadFont('font-files/InterVariable.ttf')
await inspector.loadFont('font-files/InterVariable.ttf?v={{ttf_timestamp}}')
// await inspector.loadFont('font-files/InterDisplay-Regular.otf')

0 comments on commit 1ea78b6

Please sign in to comment.