Very cool!
Font files are referenced in the <head>
within style tags:
["\t<style>\n@font-face {\n font-family: 'sfns_displayregular';\n src: url('SFFont.hyperesources/system_san_francisco_display_regular-webfont.eot');\n src: url('SFFont.hyperesources/system_san_francisco_display_regular-webfont.eot?#iefix') format('embedded-opentype'),\n url('SFFont.hyperesources/system_san_francisco_display_regular-webfont.woff2') format('woff2'),\n url('SFFont.hyperesources/system_san_francisco_display_regular-webfont.woff') format('woff'),\n url('SFFont.hyperesources/system_san_francisco_display_regular-webfont.ttf') format('truetype'),\n url('SFFont.hyperesources/system_san_francisco_display_regular-webfont.svg#sfns_displayregular') format('svg');\n font-weight: normal;\n font-style: normal;\n\n} \n\t</style>"]
Here's a document to test with: SFFont.zip (128.5 KB)
Because we use closure to minify our outputted code, new Hype versions may use new variables in our exported JavaScript. As long as you're only rewriting strings containing the DOCUMENTNAME.hyperesources
folder + filenames (and not depending on the existence of a separate variable in the output) then this gem should work across versions. You may also want to make clear that this is for Tumult Hype 3 -- we have many users continuing to use Tumult Hype 2.