harfbuzz / harfruzz

Port of RustyBuzz to use Fontations
MIT License
36 stars 3 forks source link

Remove deref polymorphism #12

Open simoncozens opened 1 month ago

simoncozens commented 1 month ago

Deref polymorphism (using Deref to emulate inheritance) is a Rust anti-pattern. I tried to look up a definition for set_variation, and could not find one - this is because it was actually defined on a different object which we magically morph into; not easy to follow.

I kept a facade method for tables since that avoids exposing the ttfp_face implementation outside of the hb_font_t structure, but inside it, explicit is better than implicit.

simoncozens commented 1 month ago

(Tests failing because unicode_properties is updated to the latest Unicode release.)

simoncozens commented 1 month ago
(rebased)