Is there an API for displaying instance preview same way as Variable Font Preview does?

Is there an API for displaying an instance preview the same way as the Variable Font Preview 3 does?

Basic idea would be

Glyphs.font.instances[0].axes = customized_values
Glyphs.font.instances[0].updateInterpolationValues()

@Mark

I don’t really understand what you are trying to do. Could you elaborate or rephrase the question a bit to be more specific?

From what I understand, Filip is trying to build a (floating) instance preview window like the one Variable Font Preview has, and is wondering how it was done.

Hi @Mark

I need to preview an instance or interpolation in separate window.

(…Trying to interpolate between masters of multiple glyphs files)

Variable font preview displays its own preview window instead of using the Glyphs window at the bottom.

So, I am curious whether there is a specific API call or method to build the window and display an instance. Or is it necessary to build such a window from scratch?

The window you need to build yourself. That is rather easy. But the drawing and interpretation might need some work. Specifically the “from multiple glyphs files” part.

Ah yes. Thanks for the details. Yes, like Georg said, that’s all done from scratch. There are several plugins you could puzzle your way along from. For example our Plugin With Window (Glyphs SDK) and the Waterfall plugin.

1 Like

There is an API to overtake the preview view.

1 Like

Aha okay, I’ll try it.