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
c34739760c
[symfont] Handle closePath()
...
Apparently some draw() implementations expect closePath() to
draw a line to the contour beginning.
In fact, looks like fontTools's TrueType draw() always does the
lineTo() before closePath(), but the CFF draw() doesn't.
As raised in
https://github.com/behdad/fonttools/pull/618#issuecomment-225314022
2016-06-10 16:06:22 -07:00
Behdad Esfahbod
7822958fa5
[symfont] Negate sign in green() function
...
Following the theorem declaration:
https://en.wikipedia.org/wiki/Green%27s_theorem
we should negate the result. Ie, for a counter-clockwise curve,
the area must be positive.
Raised in
https://github.com/behdad/fonttools/pull/618#issuecomment-225205335
2016-06-10 15:58:56 -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
Tal Leming
fff92b9dfd
Merge branch 'master' into ufo4
...
# Conflicts:
# Lib/ufoLib/glifLib.py
2016-06-07 13:27:05 -04:00
Tal Leming
c9ced7f718
Use fs.path instead of os.path.
2016-06-07 13:24:30 -04:00
Behdad Esfahbod
c794ff85d6
Fix typo in comments
2016-06-06 22:06:33 -07:00
Adrien Tétar
f865b4e4a9
Merge pull request #32 from anthrotype/et-warning
...
plistFromETree: use len(element) to check if there are subelements
2016-06-05 11:13:24 -07:00
Cosimo Lupo
971a92bfe8
glifLib: use len() to check if ElementTree.Element is empty or contains children
2016-06-05 19:07:45 +01:00
Cosimo Lupo
fed7cef3cf
validators: check isinstance of collections.Mapping rather than dict
...
The `collections` module provides a set of abstract base classes that can be used to
test whether a class provides a particular interface (e.g. whether it is a mapping).
It's better if ufoLib uses that with `isinstance` rather than requiring instances of
`dict`, or subclasses of `dict`.
2016-06-05 16:16:02 +01:00
Cosimo Lupo
fc4f810f61
plistFromETree: use len(element) to check if there are subelements to avoid FutureWarning
2016-06-05 16:03:24 +01:00
Cosimo Lupo
62a6222652
Merge pull request #614 from moyogo/fixunescape
...
[feaLib]: fix unescape_mac_name_string() and unescape_windows_name_string()
2016-06-01 18:06:36 +01:00
moyogo
70a60433f8
[feaLib]: fix unescape_mac_name_string() and unescape_windows_name_string()
2016-06-01 17:33:15 +01:00
Adrien Tétar
133b4766a3
Merge pull request #31 from unified-font-object/fix-tests
...
Fix tests
2016-05-31 10:01:45 -07:00
Adrien Tétar
81e6c235af
glifLib: fixup contour validation code
2016-05-31 09:59:02 -07:00
Denis Moyogo Jacquerye
04d96d7fe0
test: split tests in test_GLIF1 and test_GLIF2
2016-05-31 09:46:57 -07:00
Denis Moyogo Jacquerye
8de044427d
Update .gitignore with .cache and .coverage
2016-05-31 09:46:57 -07:00
Denis Moyogo Jacquerye
b8f4145d76
glifLib: raise error when text is in <glyph> and in <outline>
2016-05-31 14:33:58 +01:00
Denis Moyogo Jacquerye
49c9640f73
test: split GLIF1 and GLIF2 tests
2016-05-31 11:25:12 +01:00
Denis Moyogo Jacquerye
16e2c0f308
use unicode_literals
2016-05-31 11:23:05 +01:00
Tal Leming
f5a8299e59
Don't restrict what can be removed at the filesystem level.
2016-05-28 12:02:54 -04:00
justvanrossum
123d7c10b6
Found a font that has an empty SingleSubst mapping. While that's silly, it's not necessarily illegal. FontTools, however, would crash with an AssertionError upon compilation. Fixed.
2016-05-28 22:20:31 +09:00
Behdad Esfahbod
18f70c75c5
[varLib] Add interpolation functions
...
Untested.
2016-05-26 13:34:37 -07:00
Tal Leming
fcde72c819
Merge pull request #29 from benkiel/patch-1
...
Testing for ufoz
2016-05-26 14:48:55 -04:00
Tal Leming
1c3526bcb8
Merge pull request #28 from unified-font-object/et
...
Use ElementTree in glifLib and drop embedded XML parsing infrastructure
2016-05-26 14:48:14 -04:00
Ben Kiel
317214dfb1
If structure is zip, make sure saved file is ufos
2016-05-24 11:21:00 -05:00
Ben Kiel
26863a2b79
Update __init__.py
...
Add in ufoz for testing.
2016-05-24 11:07:53 -05:00
Adrien Tétar
8044d2fb88
Use ElementTree in glifLib and drop embedded XML parsing infrastructure
2016-05-20 11:11:15 -07:00
Behdad Esfahbod
84d34353e3
Merge pull request #608 from khaledhosny/file-attribute
...
Check for file attribute before deleting it
2016-05-19 20:01:06 +01:00
Khaled Hosny
f88c43d105
Check for file attribute before deleting it
...
I don’t know why this is happening, but I’m getting attribute error when
I build https://github.com/khaledhosny/mada with compreffor
optimisations on.
2016-05-19 20:50:10 +02:00