make harmonization robust and avoid zero handles after harmonization#5262
Merged
skef merged 2 commits intofontforge:masterfrom Jan 4, 2024
Merged
make harmonization robust and avoid zero handles after harmonization#5262skef merged 2 commits intofontforge:masterfrom
skef merged 2 commits intofontforge:masterfrom
Conversation
…f harmonization is now numerically robust
Contributor
|
@linusromer could you rebase? |
Contributor
Author
|
@skef I guess merging into master was enough? Or do you really need a rebase? |
Contributor
|
Naw, either works. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Non-breaking change
After my presentation at the TUG Conference 2023, Jan Šustek correctly made me aware of the fact, that my harmonization formula is not numerically stable for some cases and that I should use the citardauq formula instead. Which I have done now in the code.
Furthermore harmonization is now no longer applied if it would produce a zero handle (because then the curvature would be either infinitely large, so it wouldn't be continuous, or it would be zero, so harmonization would not change anything).
I have also written a paper, that describes the whole process of harmonization in more detail here (the reference implementation is in METAPOST, but the math is the same)
romer-curvetools.pdf