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

Always use blend for stem storage in cffwrite_t2cstr.c #1591

Merged
merged 1 commit into from
Jan 5, 2023
Merged

Conversation

skef
Copy link
Collaborator

@skef skef commented Jan 4, 2023

Description

The current version of this file stores stems in a union, with just a float for edge0 and edge1 in one case and a blend structure in the other. CFF2 uses the blend while CFF uses just the float. The blend .value happens to coincide with the float.

This sort of works but the model breaks down for non-blended stems in CFF2 output. It's better to just use the blend structure for all cases with hasBlend set to false if there's no blend data. That way CFF output can ignore everything but the "default" value and CFF2 output can correctly detect whether it needs to output a blend.

Checklist:

  • I have followed the Contribution Guidelines
  • I have added test code and data to prove that my code functions correctly
  • I have verified that new and existing tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Copy link
Contributor

@cjchapman cjchapman left a comment

Choose a reason for hiding this comment

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

👍

@skef skef merged commit ba4e6ed into develop Jan 5, 2023
@skef skef deleted the stemunion branch January 5, 2023 00:04
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