Behdad Esfahbod
b9dcbb5668
Do some less work!
2016-07-25 04:00:44 -04:00
Behdad Esfahbod
021d8c107d
Remove unused code
2016-07-25 03:57:33 -04:00
Behdad Esfahbod
59e8ce6e84
Inline cubic_cubic_fit()
...
Results in a few percents speedup.
2016-07-25 03:53:23 -04:00
Behdad Esfahbod
3aa4c1e1e4
Remove unused error code
2016-07-25 03:38:13 -04:00
Behdad Esfahbod
612aa2af87
Return results in tuples, not complex points
2016-07-25 03:35:40 -04:00
Behdad Esfahbod
1cc3c5eae8
Inline _splitCubicIntoN()
2016-07-25 03:14:02 -04:00
Behdad Esfahbod
40bba687ab
Replace splitCubicAtT() with splitCubicIntoN()
...
Another 6% speedup.
2016-07-25 03:13:01 -04:00
Behdad Esfahbod
64af3ad4a8
Inline cubic_quadratic_fit()
...
Another 5%.
2016-07-25 03:04:51 -04:00
Behdad Esfahbod
abc18236af
Inline splitCubicIntoTwo()
...
Saves another 5%.
2016-07-25 02:12:15 -04:00
Behdad Esfahbod
c50d498ea5
Hand-code splitCubicIntoThree()
2016-07-24 14:10:41 -04:00
Behdad Esfahbod
8a13ef1edf
Use splitCubicIntoTwo() more
...
Shaves another 5%.
2016-07-24 13:54:52 -04:00
Behdad Esfahbod
dff2cd8669
Add splitCubicIntoTwo()
...
Speeds up another 15% or so.
2016-07-24 13:54:52 -04:00
Behdad Esfahbod
12629a715b
Whitespace
2016-07-23 17:11:45 -07:00
Behdad Esfahbod
f63a31dd99
Do less work.
2016-07-23 17:11:28 -07:00
Behdad Esfahbod
a412c1c9ec
Make benchmark callable from profile / cProfile module
2016-07-23 16:28:28 -07:00
Behdad Esfahbod
d3f566ba54
Use complex numbers to implement points
...
Shows a 30% speedup for me.
2016-07-22 23:40:44 -07:00
Behdad Esfahbod
46f8416fff
Remove more unused code
2016-07-22 23:11:13 -07:00
Behdad Esfahbod
bd52b4d510
Remove unused code
2016-07-22 15:52:00 -07:00
Behdad Esfahbod
49c2d886a0
Use exact error
...
To me, this looks about 40% faster.
WIP though. API needs to change to take out error output argument.
Further optimization is possible by merging loops.
2016-07-22 02:21:41 -07:00
Behdad Esfahbod
185216bbfe
Remove unused return values
2016-07-22 01:13:12 -07:00
Behdad Esfahbod
2d5e57e973
Make it twice faster by inlining lerp and expanding bezier equations
2016-07-22 00:49:19 -07:00
Cosimo Lupo
ae2eb8d4df
cu2qu.pens: make sure closed contour starts with an on-curve
...
This is still the same contour as before, as UFO spec allows both;
it's just normalized so that the first segments' off-curves appear at
the bottom, and the first point in the contour is an on-curve.
2016-07-21 11:35:41 +01:00
James Godfrey-Kittle
c82b78b1b8
Merge pull request #25 from googlei18n/reverse-contours
...
Add reverse_direction argument
2016-05-11 10:55:50 -07:00
James Godfrey-Kittle
3307c5d62a
Add reverse_direction argument
...
As described in
https://github.com/googlei18n/cu2qu/pull/20#issuecomment-213058410
2016-05-10 18:01:34 -07:00
Behdad Esfahbod
79aaf25ae2
[test] Fix seed in class setup
...
Fixes https://github.com/googlei18n/cu2qu/issues/24
2016-04-30 17:59:50 +02:00
James Godfrey-Kittle
dc904ef31f
Move root module tests to test/ directory
2016-04-21 11:32:36 -07:00
James Godfrey-Kittle
57fa1f46f4
Merge branch 'master' into tests
2016-04-21 11:30:13 -07:00
James Godfrey-Kittle
c82ca16fde
Merge pull request #20 from anthrotype/pens
...
add pens module containing Cu2QuPen, Cu2QuPointPen, etc.
2016-04-21 11:25:59 -07:00
James Godfrey-Kittle
4135842c4e
Add some simple tests for main module
2016-04-20 16:21:35 -07:00
James Godfrey-Kittle
fbb51f3a62
[benchmark] Update function calls
2016-04-20 14:40:49 -07:00
James Godfrey-Kittle
7fe4fd0fe2
[ufo] Don't touch components or UFO2-style anchors
2016-04-05 10:41:48 -07:00
James Godfrey-Kittle
802bb813f5
[ufo] Changes for python 3 compatibility
2016-04-05 10:37:07 -07:00
James Godfrey-Kittle
983307d9cd
[ufo] Allow input fonts with quadratic curves
2016-04-04 17:30:33 -07:00
James Godfrey-Kittle
0ec7495516
[ufo] Handle endPath
2016-04-04 16:08:15 -07:00
James Godfrey-Kittle
b8fa142bef
[ufo] Clear existing contours when adding new ones
2016-04-04 15:30:39 -07:00
James Godfrey-Kittle
17e25e8ec9
Rename rf module to ufo
2016-04-04 15:18:27 -07:00
James Godfrey-Kittle
7b816131f8
Make UFO code non-robofab specific
2016-04-04 15:15:05 -07:00
Cosimo Lupo
219efbc6f0
[test.utils] typo
2016-03-25 20:09:14 +01:00
Cosimo Lupo
a21c388355
[test.pens_test] add test module for Cu2Qu pens
2016-03-25 19:55:39 +01:00
Cosimo Lupo
5f8bb98107
[test.utils] add dummy pen and glyph classes to use with unit tests
2016-03-25 19:55:38 +01:00
Cosimo Lupo
2a6feb01be
[test] add __init__.py to turn 'test' into a sub-package
2016-03-25 19:55:38 +01:00
Cosimo Lupo
072a60da97
create test folder; add test .glif files
2016-03-25 19:55:38 +01:00
Cosimo Lupo
a246bcfdbd
[pens] add "super bezier" support to Cu2QuPointPen
2016-03-25 19:55:38 +01:00
Cosimo Lupo
8e3c6ce5a2
[pens] minor comments and assertion error message
2016-03-25 19:55:08 +01:00
Cosimo Lupo
c5bd215e2f
[pens] add assertions esuring that Cu2QuPen methods are called in the right order
2016-03-25 14:26:33 +01:00
Cosimo Lupo
a79ea7e126
[pens] set smooth=False for offcurve points in new quadratic segments
2016-03-18 15:41:44 +00:00
Cosimo Lupo
4f6d04bcf3
[pens] don't use super() for compat with robofab's old-style classes
2016-03-18 15:40:16 +00:00
Cosimo Lupo
84f24b189b
[pens] fix imports for robofab pens
2016-03-16 18:58:06 +00:00
Cosimo Lupo
9fcca0f5c5
[pens] call lineTo if len(points) == 1 in qCurveTo()
...
we were alrady doing that in curveTo, so we might well do it here too
2016-03-16 10:39:06 +00:00
Cosimo Lupo
adaa9fc242
[pens] add docstrings; make ignore_single_points=False by default
2016-03-16 10:14:05 +00:00