Commit 98a2579
committed
Add the early stopping in _twin_spline_decompose
Take the right half of the spline as another standard when finding the
optimal t. Because if the right half of the spline is also within the
tolerance, the right half of the spline will be the last curve segment.
Thus, in this case, there is no need to find better t, which aims to
prevent more line segments from being generated in the future.
I have modified the implementation of font-edit to use fixed-point
arithmetic and used it as the evaluation testbed to do experiments as
follows:
original - Average number of _de_casteljau calls per point: 1.99
original - Average points per character: 18.89
flexibly update - Average number of _de_casteljau calls per point: 4.53
flexibly update - Average points per character: 16.30
flexibly update (early stopping)- Average number of _de_casteljau calls per point: 4.23
flexibly update (early stopping)- Average points per character: 16.181 parent 01bb810 commit 98a2579
1 file changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 110 | + | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
116 | | - | |
| 114 | + | |
| 115 | + | |
117 | 116 | | |
| 117 | + | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
0 commit comments