... to a more general gpu_cache and store an enum. That way we can
encapsulate the resource releasing - in the future - entirely in the
backend through run-time polymorphism in the backend (gpu cache data
enum) instead of a vtable method in the item to destruct the correct
type of data.
This is the start of a different rendering abstraction, the result of a
separate discussion.
The objective is to provide a better backend encapsulation, that will
make it easier to implement other backends and let the backend decide
what to cache and what not. This is done by passing the struct with the
Property<> fields directly to the backend, so that it can decide what
the cache and what to use every time.
The active_animation was set to false, but if the animation tick did not change, the animation tick
was not maked dirty, and we wouldn't then re-evaluate animated property that would set the
active_animation to true again
Don't require the caller to Box the closure. With the assumption that
the majority of callers *want* the closure to be boxed (i.e. it's not
already boxed), the API becomes easier to use.
For regular builds this is done by adding Rust API that allows
registering a font, and for the web the font is installed into the
browser using JavaScript API.
This is an initial approach to just add this ability. It might make
sense to introduce a syntax in the `.60` file to allow for the
registration of fonts and letting the compiler generate code that
performs this embedding and registration automatically.
Since TextMetrics can't give us the ascent/descent yet, the web points
towards another clever alternative: Using offsetHeight on a span and the
same font.
That allows removing the padding hack that also broke the arrow
placement in the printer demo.
* When no family is specified, explicitly try to select the system font or fall back to sans-serif.
Do avoid running into Times New Roman that way %-)
* Add padding to the canvas texture height to work around missing height measurements
and avoid the bottom clipped glyphs that way