James Godfrey-Kittle
5c723ebfb0
[feaLib] Don't assume feature has lookups in DFLT
...
It's possible for all of a feature's lookups to be in specific script
and/or language systems, so this code could crash.
2016-06-22 16:19:45 -07:00
James Godfrey-Kittle
e2186dec53
[feaLib] Don't set language when script is unset
...
Before, if someone tried to set the language before setting the script
a None/language language system would be created (with actual tag
"None" stored in the feature table). This defaults to tag DFLT and
fails when a non-dflt language is set for DFLT, since that's illegal.
2016-06-22 11:29:42 -07:00
James Godfrey-Kittle
aaf9294d97
[feaLib] Add another test for language systems
2016-06-21 16:40:17 -07:00
James Godfrey-Kittle
d1af1cfd4a
[feaLib] Fix exclude_dflt handling
...
This is to fix what I think was a misunderstanding of the exclude_dflt
keyword (and the implicit include_dflt option active by default).
Rather than including the following lookups in the default language
systems, I think it is used to include the lookups specific to default
language systems in the system defined by the current language
statement. Thus instead of registering a lookup in all default
systems when include_dflt is true, we should exclude the lookups
registered with default systems from the current system when
include_dflt is false.
2016-06-21 16:39:27 -07:00
Behdad Esfahbod
0deb34829c
[Snippets/interpolatable.py] Add preliminary script for detecting interpolation errors
...
Very basic. Right now detects if glyphs have wrong order of contours / components.
2016-06-15 18:46:59 +04:00
Behdad Esfahbod
220ff2b238
[pens.areaPen] Clean up a bit
...
Based on discussion in
https://github.com/behdad/fonttools/pull/618#issuecomment-226105824
2016-06-15 14:10:44 +04:00
Behdad Esfahbod
b0b049774c
Implement analytical curve length for quadratic beziers
...
This is multiple times faster, and tolerance-independent.
I'll explain how I arrived at this later.
2016-06-13 20:08:50 -04:00
Behdad Esfahbod
56c27f45c9
Speed up perimeterPen
...
It's still too slow, but an improvement.
Also, remove duplicate copy from symfont.
2016-06-13 18:50:01 -04:00
Behdad Esfahbod
71fb49962a
Improve perimeterPen tests
...
The tolerance on the pen is set to 0.5%, so it does not make sense
to test for accuracy for anything more than integers given the
values.
2016-06-13 18:47:03 -04:00
Tal Leming
89d8cfa7eb
Removing metainfo.plist is no longer expressly prohibited (it shouldn't be done though). Raise an error when removing a missing file.
2016-06-13 13:36:30 -04:00
Tal Leming
ea54c77670
Don't try to remove the root directory.
2016-06-13 13:33:31 -04:00
Tal Leming
be90029b22
Arguments were transposed.
2016-06-13 13:22:36 -04:00
Tal Leming
c864359fb2
Define writer.
2016-06-13 13:19:40 -04:00
Tal Leming
0e569793a7
The populated info objects should be written, not an empty object.
2016-06-13 13:17:36 -04:00
Tal Leming
bfba532621
Force the removal of non-empty directories during directory removal.
2016-06-13 13:13:56 -04:00
Tal Leming
15c4ff20a3
UFOLibError is now raised instead of GlifLibError.
2016-06-13 13:10:55 -04:00
Miguel Sousa
9efcaf05e4
Unit tests for AreaPen and PerimeterPen
2016-06-12 15:46:52 -07:00
Miguel Sousa
92e8455259
perimeterPen.py: make glyphset the first argument (like in all other pens)
2016-06-12 15:46:04 -07:00
Cosimo Lupo
c5ed6c6456
perimeterPen.py: handle implied lineTo in closePath
2016-06-12 11:49:00 +01:00
Cosimo Lupo
d51b88a234
areaPen.py: remove unused 'interpolate' function; call polygon_area directly in closePath
2016-06-12 11:37:02 +01:00
Cosimo Lupo
39f919f1f1
areaPen.py: calculate area under quadratic curve directly, using Green theorem
2016-06-12 03:14:09 +01:00
Cosimo Lupo
5f0e48e649
areaPen.py: make sure the first and last points of contour overlap
2016-06-12 03:13:32 +01:00
Cosimo Lupo
38359b054d
areaPen.py: invert sign of area (CCW is now positive)
2016-06-12 03:12:02 +01:00
Cosimo Lupo
c08e47ed47
perimeterPen.py: copy PerimeterPen from symfont.py
2016-06-11 23:07:23 +01:00
Cosimo Lupo
eb7e193773
areaPen.py: typo
2016-06-11 23:07:23 +01:00
Cosimo Lupo
76dc5d2607
areaPen.py: use tabs for indentation as that's the norm in fontTools
...
(despite I prefer spaces)
2016-06-11 23:07:23 +01:00
Cosimo Lupo
2dc88be8a7
areaPen.py: remove unused 'distance' function
2016-06-11 23:07:23 +01:00
Cosimo Lupo
2cb93ee7dd
areaPen.py: hook up quadratic_curve_area to AreaPen._qCurveToOne method
2016-06-11 23:07:23 +01:00
Cosimo Lupo
ac3b30e0db
areaPen.py: add default __future__ imports
2016-06-11 23:07:23 +01:00
Cosimo Lupo
ad4b94f4b9
areaPen.py: use regular tuples for points instead of namedtuple
2016-06-11 23:07:23 +01:00
Cosimo Lupo
046333dda5
areaPen.py: pen to calculate the area of a glyph (by Behdad)
...
https://github.com/behdad/fonttools/issues/617#issuecomment-225029592
2016-06-11 23:07:23 +01:00
Behdad Esfahbod
be27acbbd2
[varLib] Fix thinko
2016-06-10 19:49:45 -07:00
Behdad Esfahbod
78c29bc5a1
Some more solveCubic() work
...
Should be stable again now.
2016-06-08 18:56:31 -07:00
Behdad Esfahbod
93d08d4188
[mtiLib] Accept "u " as well as "U " in Unicode glyph references
...
Fixes https://github.com/googlei18n/fontmake/issues/86
2016-06-08 15:17:08 -07:00
Behdad Esfahbod
b2bd15d580
Make solveCubic() more robust
...
Also, return duplicate roots multiple times.
Part of https://github.com/behdad/fonttools/issues/617
2016-06-08 14:54:23 -07:00
Tal Leming
a0a942bc7d
Make copying a directory from a source to a dest work.
2016-06-08 14:26:01 -04:00
Tal Leming
4162429c53
Flipped args.
2016-06-08 13:39:14 -04:00
Tal Leming
6043db4f11
Switch to rb mode.
2016-06-08 12:06:35 -04:00
Tal Leming
cea3ba9b43
Fix some minor issues to resolve some failing tests.
2016-06-08 11:09:37 -04:00
Tal Leming
21f36611f0
Found something hardwired to the package structure.
2016-06-08 10:31:39 -04:00
Tal Leming
76480ec37f
fs.path not self._fs.path.
2016-06-08 10:31:21 -04:00
Tal Leming
82958e2711
Name the argument.
2016-06-08 10:31:07 -04:00
Tal Leming
1eebdaf84a
These are no longer around.
2016-06-08 10:30:52 -04:00
Tal Leming
1ed9fb14f5
Remove some unneeded functions.
2016-06-08 09:36:57 -04:00
Tal Leming
3fa83a1924
Remove a deprecated function.
2016-06-08 09:05:43 -04:00
Tal Leming
5014279665
Don't subclass FileSystem.
2016-06-08 09:04:29 -04:00
Behdad Esfahbod
b1474a3993
Minor
2016-06-07 16:21:43 -07:00
Behdad Esfahbod
c4f8cbb6a1
[varLib/mutator.py] Update hmtx lsb after updating glyf bounds
2016-06-07 15:51:54 -07:00
Behdad Esfahbod
e53764a16d
In calcIntBounds(), round values
...
The glyph coordinates in glyf table are going to be rounded when
writing out, so we should use the same mode of conversion to
integers. Otherwise the xMin of a glyph might end up being
different from its actual minimum X.
2016-06-07 15:47:02 -07:00
Behdad Esfahbod
d1424e9d5a
Improve solveCubic() against rounding issues
...
Might fix https://github.com/behdad/fonttools/issues/617
2016-06-07 14:16:42 -07:00