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

Replace fello with skrifa for font rendering #423

Merged
merged 4 commits into from
Jan 25, 2024
Merged

Replace fello with skrifa for font rendering #423

merged 4 commits into from
Jan 25, 2024

Conversation

dfrg
Copy link
Collaborator

@dfrg dfrg commented Jan 24, 2024

This replaces our bespoke fello lib with skrifa from crates.io which brings us one step closer to being able to release.

Causes a slight regression since we no longer support hinting but that will be fixed when support lands upstream (soon!)

This replaces our bespoke fello lib with skrifa from crates.io which brings us one step closer to being able to release.

Causes a slight regression since we no longer support hinting but that will be fixed when support lands upstream (soon!)
Copy link
Contributor

@Philipp-M Philipp-M left a comment

Choose a reason for hiding this comment

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

I've not got the deepest knowledge within vello skrifa, but changes look good to me, and it works on my machine, thanks.

@simbleau
Copy link
Member

hinting

What is hinting?

@Philipp-M
Copy link
Contributor

I think wikipedia does a good job explaining that.

@@ -49,18 51,16 @@ impl GlyphCache {
};
encoding_cache.encode_fill_style(fill);
let mut path = encoding_cache.encode_path(true);
let outline = outlines.get(GlyphId::new(key.glyph_id as u16))?;
let draw_settings = skrifa::outline::DrawSettings::unhinted(size, coords);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let draw_settings = skrifa::outline::DrawSettings::unhinted(size, coords);
// FIXME: Re-add hinting when skrifa supports it
let draw_settings = skrifa::outline::DrawSettings::unhinted(size, coords);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, a little reminder won't hurt. Also added a link to the tracking issue.

@dfrg
Copy link
Collaborator Author

dfrg commented Jan 25, 2024

What is hinting?

The wikipedia article does a good job explaining the concept. Our fello crate does contain an implementation of hinting but it's not production quality. My current task at day job is making it so and landing it in skrifa so this should be done soon.

@dfrg dfrg merged commit 1c06c30 into main Jan 25, 2024
4 checks passed
@dfrg dfrg deleted the de-fello branch January 25, 2024 01:30
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.

3 participants