Skip to content

Conversation

@skef
Copy link
Collaborator

@skef skef commented Oct 11, 2024

This is a very simple fix for rounding stem locations in otfautohint. I didn't really add new tests, but @punchcutter and I updated some existing tests with new output, some of which demonstrate the rounding.

This problem crept in because the old and new code have difference sources of stem "locations", particularly when it comes to inflection points and spline extrema. So while most of the rounding was handled by having round spline endpoint locations, some of it wasn't. This PR adds rounding at the point where "segments" (which are used down-stream to choose stem locations) are added.

Simply rounding BlueValue locations like this wouldn't work because stems have to be within a blue zone to be affected by one, as I learned with the more recent FreeType fix. But with stems it seems to be a matter of just being near enough to one side (which makes conceptual sense). So I think we should integrate this and then do basic verification using Momochidori.

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

@skef skef requested a review from josh-hadley October 11, 2024 20:26
@skef skef merged commit c284ff7 into develop Oct 14, 2024
17 checks passed
@skef skef deleted the acround branch October 14, 2024 20:29
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.

4 participants