Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deref polymorphism #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simoncozens
Copy link

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
Copy link
Author

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

Copy link
Collaborator

@rsheeter rsheeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eeek, ty

@simoncozens
Copy link
Author

(rebased)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants