Preview server update logic and settings?

I love the new preview server introduced for previewing TT hinting. Since I find it super useful for previewing text in general I was wondering:

· Do I understand correctly that it only updates when the TT hinting tool is active and interacting with the drawing area?
· Could this be configured to also work with other tools?
· Could this be configured to show only specific sizes?
· Can the refresh interval be changed, or even be triggered only on an action (i.e. save, or something else) instead of running as interval?
· Is there a difference in the refresh for updating text and updating paths, i.e. generating a new file, and could for instance updating text / switching tabs / using other than the TT tool be more instantaneous?
· Can you preview other than the first master?

Cheers,
J

The HTML is only refreshed when the TT Instructor is active, and after you triggered the server with right-clicking and copying the URL.

Why? And which tools?

If you just want a web preview, and not so much a hinting preview, you can also use a script for generating an HTML and then open it in a browser. See the Webfont Test HTML script in my repo.

You mean more often or less often?

Currently it has a refresh timer of two seconds built into the HTML Head, and the font is stored URL-encoded inside the same HTML file.

And of course, you can always write your own. I can help you with finding useful functions for that if you like.

It previews the current instance. Open the Preview area at the bottom and choose an instance from the pop-up menu.

1 Like

The HTML is only refreshed when the TT Instructor is active, and after you triggered the server with right-clicking and copying the URL.

Why? And which tools?

Well, curve editing for instance, or text tool.

If you just want a web preview, and not so much a hinting preview, you can also use a script for generating an HTML and then open it in a browser. See the Webfont Test HTML script in my repo.

Fantastic! I suppose I can make that work to autorefresh; this is part of what I wanted that does not have to do with TT hinting per se :grin:

You mean more often or less often?

Currently it has a refresh timer of two seconds built into the HTML Head, and the font is stored URL-encoded inside the same HTML file.

Could it refresh triggered by changes is what I meant.

It previews the current instance. Open the Preview area at the bottom and choose an instance from the pop-up menu.

Ah, I switched masters and nothing happened; didn’t think to use the preview’s style picker since I rarely use anything than the “-” option.

Thanks for this great feature and for the example code in your repo, had not seen the html preview before!

1 Like

What kind of changes? Exporting a WOFF or user interaction (like dragging a node) in the Glyphs UI?

The former should be easier, because all you need to do (though I do not know if that is possible) keep checking modification dates from within JavaScript, and reload the font if it did. Perhaps @Lorp can chime in on this?