robotools / fontParts

The replacement for RoboFab
MIT License
133 stars 44 forks source link

Add implementation for `glyph.autoContourOrder()` #646

Closed roberto-arista closed 2 years ago

roberto-arista commented 2 years ago

as #645

This morning @typemytype realized that sorting FuzzyNumbers along with other types does not work as expected. So the old roboFab implementation needed some adjustments. I mark this as WIP as it might need some extra testing!

roberto-arista commented 2 years ago

I've fetched the updated defcon version on my repo and the tests run fine!

codecov[bot] commented 2 years ago

Codecov Report

Merging #646 (4242747) into master (ee98474) will increase coverage by 0.04%. The diff coverage is 77.27%.

@@            Coverage Diff             @@
##           master     #646      +/-   ##
==========================================
+ Coverage   77.69%   77.73%   +0.04%     
==========================================
  Files          41       41              
  Lines        6011     6055      +44     
  Branches     1045     1055      +10     
==========================================
+ Hits         4670     4707      +37     
- Misses       1147     1151       +4     
- Partials      194      197       +3     
Impacted Files Coverage Δ
Lib/fontParts/base/base.py 87.22% <55.55%> (-1.94%) :arrow_down:
Lib/fontParts/base/glyph.py 77.28% <92.30%> (+0.51%) :arrow_up:
Lib/fontParts/base/contour.py 55.01% <0.00%> (+0.38%) :arrow_up:
benkiel commented 2 years ago

@roberto-arista Is there anyway to do this without Defcon? It would be ok if this went into fontShell, but the idea is to keep dependencies, as much as possible, out of the fontParts api

typemytype commented 2 years ago

mmm, I see... FuzzyNumbers are important here...

moving to fontShell is fine for me

benkiel commented 2 years ago

I mean, we could copy FuzzyNumber into fontParts if that is useful in other places. Sorry to be a purist about the API!

benkiel commented 2 years ago

Consensus is to copy FuzzyNumber into base.py and import from there

roberto-arista commented 2 years ago

🎉