James Godfrey-Kittle
ebebcd9f0d
Use logger instead of printing info
2016-11-29 16:57:42 -08:00
Cosimo Lupo
6618095c36
ufo: raise custom IncompatibleGlyphsError exception with the name(s) of incompatible glyphs
...
Fixes https://github.com/googlei18n/cu2qu/issues/46
2016-11-04 15:30:40 +00:00
James Godfrey-Kittle
509b82204e
[minor] rename variable
2016-10-20 11:25:02 -07:00
James Godfrey-Kittle
4782dd64d3
Merge pull request #50 from anthrotype/no-zip-fonts
...
[ufo] in fonts_to_quadratic, iterate over union of glyph names
2016-10-20 10:55:45 -07:00
Cosimo Lupo
a876671e6f
[ufo] glyphs_modified = reverse_direction
2016-10-06 16:17:26 +01:00
Cosimo Lupo
c2792f858b
[ufo] when reverse_direction is True, we always want to modify the input glyphs
...
otherwise, the direction would only flipped if the glyph contains at least one cubic curve; whereas, we want to reverse the contour direction of all the glyphs in the font, even if they are just made of straight lines.
2016-10-06 15:14:44 +01:00
Cosimo Lupo
9c229e6509
[ufo] max_errors and glyphs list must have same length
...
Else curves_to_quadratic raises AssertionError if len(max_errors) != len(curves)
https://github.com/googlei18n/cu2qu/blob/master/Lib/cu2qu/__init__.py#L244
2016-09-21 00:51:06 +01:00
Cosimo Lupo
a5f93a06b9
[ufo] in fonts_to_quadratic, iterate over union of glyph names and convert compatibly glyphs with same name.
...
Don't use zip(*fonts) as defcon fonts are dictionary-like objects and the ordering of the glyphs returned by __iter__ method is undefined.
Should fix #48
2016-09-20 23:34:32 +01:00
Cosimo Lupo
826b790147
[ufo] minor refactor
2016-09-19 13:10:57 +01:00
Cosimo Lupo
f2e962c78f
[ufo] don't check glyph names in glyphs_to_quadratic
2016-08-12 16:00:20 +01:00
Cosimo Lupo
e7854e5039
[ufo] add glyph[s]_to_quadratic to convert (1+ compatible) glyphs
...
This was requested in https://github.com/googlei18n/cu2qu/issues/26
Plus:
- do not modify input glyphs unless they contain one cubic curve;
- make public functions return True/False to signal that the input
was modified or not (eg. no curves, or all quadratic)
2016-08-12 15:30:51 +01:00
James Godfrey-Kittle
daaa1bd06f
Report number of segments in result, not points ( #41 )
...
For some reason, I was subtracting 1 from the spline lengths in the
test report. Not sure why that is, so I've assumed it was wrong (and
now we subtract 2 to get the length in number of segments).
2016-08-01 14:08:26 -07:00
James Godfrey-Kittle
4d72a44d35
Remove unused code
2016-07-27 16:52:09 -07:00
James Godfrey-Kittle
039e35b212
No error returned from API, update tests
2016-07-27 13:21:47 -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
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