14 Commits

Author SHA1 Message Date
jamesgk
56f36a1b2a [API] Take in list of fonts, no **kwarg syntax
This is hopefully the last non-backwards-compatible API change. We
take a list of fonts in rf.fonts_to_quadratic so that we can spell out
its keyword arguments explicitly. Also, only one max error argument is
accepted.
2015-12-08 14:19:57 -08:00
jamesgk
b568c934d0 Remove max_n parameter
This is probably not useful as a parameter, so instead we hardcode the
value into the main module.
2015-12-08 12:44:29 -08:00
jamesgk
856ffe1fca Make only a few functions public
This way we hopefully don't have to worry about changing things behind
the scenes.
2015-12-08 12:42:42 -08:00
Cosimo Lupo
e6b47d61c9 cu2qu.rf: only get fist item returned from curve_to_quadratic, ignore approx error
curve_to_quadratic and curves_to_quadratic now return a (spline, error) tuple.
2015-12-07 15:09:26 +00:00
jamesgk
a79fb041a2 Use __future__ imports to ease Python2/3 compat 2015-12-04 13:07:32 -08:00
jamesgk
a787cd2daf Pass tuples to curves_to_quadratic in rf module 2015-12-01 17:12:30 -08:00
jamesgk
561bed0ea0 Remove Point class and only use built-ins
Using built-in types (mostly tuples) seems to cut the running time
overall by about one half. Spelling out linear interpolation in the
bezier_at functions actually cuts the running time by another 10%,
but I'm not sure if it's worth it given that this code looks a bit
nicer.
2015-12-01 13:22:24 -08:00
jamesgk
97ce534d7b Move geometry.py to __init__.py 2015-12-01 12:30:31 -08:00
jamesgk
bf6b2d9f7e Specify tolerance in em through max_err_em
This way, the `max_err` parameter is consistent with the other
functions (being in font units).
2015-11-24 12:52:03 -08:00
jamesgk
4f107a9119 Merge branch 'master' into error-em 2015-11-20 14:39:10 -08:00
jamesgk
79ea6b4973 Swap order of "max_err" and "max_n" parameters
I like this new order better, since max_err seems to be the more
important parameter, and it corresponds more closely with the actual
font object params (which can be lists) than max_n (which is always
a single value).
2015-11-20 12:06:18 -08:00
jamesgk
e94071a2d8 Specify max error in em instead of font units
This should be more compatible between fonts with different UPM. In
fact, it should work within a single call with such fonts.

The default max error is now 0.0025 em, which is about 5 units for a
2048 UPM font.
2015-11-20 12:04:48 -08:00
jamesgk
042a392d35 Take in dictionary of conversion stats
This allows stats to be accumulated between function calls.
2015-11-19 17:11:06 -08:00
jamesgk
8bbdb47cf5 Rename "robofab" module to "rf"
Apparently naming this robofab conflicts with the global robofab
module.
2015-11-19 16:59:49 -08:00