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

[write] Minor improvment to cmap 4 segmentation #1240

Closed
wants to merge 1 commit into from

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Nov 13, 2024

There was one case where fonttools was saving several bytes on us, which felt bad. We are now equal or better, for every font I've examined.

.as_ref()
// don't bother computing if we have already decided to merge
.filter(|next| !should_merge && current.can_merge(next))
.map(|next| combined.combine(*next).cost() < prev.cost() + current.cost())
Copy link
Member Author

Choose a reason for hiding this comment

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

this looks wrong 😒

There was one case where fonttools was saving several bytes on us, which
felt bad. We are now equal or better, for every font I've examined.
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.

makes sense to add to cmap-size

@cmyr
Copy link
Member Author

cmyr commented Nov 13, 2024

I'll close this and add it as a commit to #1228

@cmyr cmyr closed this Nov 13, 2024
@cmyr cmyr deleted the cmap-size-followup branch November 13, 2024 23:22
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