UNSOLVED Space center + interpolation
-
I'd like to use an extra space center with a slider to show a quick interpolation of two open ufos, with editable text. Is this possible/the best approach, or should I build something in vanilla from scratch?
My first inefficient thought was have it build out a layer with interpolations of all glyphs and then send that layer to space center, but this seems extremely taxing for the computer to update, especially with a slider.
-
here’s a different approach using representations to cache the interpolated glyphs — this may help in terms of performance…
-
-
The gist above worked, but not very well. Performance was not great.
I wrote a new version that works better but it's buried inside a much larger tool. If I have time, I'll try to updates that gist with my new approach. There is a lot of room for improvements.
My new version makes an RFont to store the interpolated glyphs. It only bothers with the glyphs used in the current multilineview, creating only what is necessary to initially display that text. Then it subscribes to the current glyph and updates that interpolation on the fly.
This version works much better, but it still gets bogged down with long strings. My current bandaid is a line-clamp feature that cuts everything off at n lines of text. Another idea I had was to delete glyphs from the RFont if they're not being used anymore, but I still need to test to see if it's faster to reinterpolate when needed or just keep everything in memory.
-
@okaytype recently did this, https://gist.github.com/okay-type/ff56766d5b7f950ae5579c61b398a22f