11 Commits

Author SHA1 Message Date
Cosimo Lupo
5558ccd3bb [colorLib.geometry] use math.isclose with relative tolerance to check circle inside-ness
Fixes rounding of radial gradient in 'SING OF THE HORNS' (medium-light skin tone) noto emoji 🤘🏼
2022-01-31 18:05:26 +00:00
Behdad Esfahbod
abc1ba07a4 [misc.roundTools] New module; move otRound() here
Code relying on old place (fixedTools.otRound) still works.
2021-03-04 09:20:43 -07:00
Cosimo Lupo
a3247ea472
compute rounding (dx,dy) offset outside loop then simply do Circle.move() inside 2021-01-18 09:50:47 +00:00
Cosimo Lupo
c13b1cef84
determine direction to nudge pre-loop 2021-01-15 19:11:10 +00:00
Cosimo Lupo
c9055871d6
minor: rename local vars without _circle suffix 2021-01-15 18:17:08 +00:00
Cosimo Lupo
b465dcff75
rename function to round_start_circle_stable_containment
as suggested in https://github.com/fonttools/fonttools/pull/2148#discussion_r557656073
2021-01-15 17:37:11 +00:00
Cosimo Lupo
4f1102ac6e
add a Circle class, handle concentrical case, explain why 2 iterations are enough 2021-01-15 16:59:17 +00:00
Cosimo Lupo
4f886cc226
reword _is_circle_inside_circle parameters for better readability 2021-01-14 19:06:33 +00:00
Cosimo Lupo
c403dbe83a
minor: rename function, remove redundant one 2021-01-14 18:57:19 +00:00
Cosimo Lupo
7f0788ca25
use math.hypot() as per review
https://github.com/fonttools/fonttools/pull/2148#discussion_r557596711
2021-01-14 18:22:57 +00:00
Cosimo Lupo
db14e6375e
COLRv1: avoid abrupt change after rounding c0 when too near c1's perimeter
Fixes https://github.com/googlefonts/picosvg/issues/158

Also see https://github.com/googlefonts/colr-gradients-spec/issues/204
2021-01-14 17:13:22 +00:00