3435 Commits

Author SHA1 Message Date
Cosimo Lupo
43914430f4
Bump version: 3.7.1 → 3.7.2.dev0 2017-02-15 12:56:30 -08:00
Cosimo Lupo
c10bc762b7
Release 3.7.1 2017-02-15 12:55:48 -08:00
Cosimo Lupo
f1673e46dd
[psCharStings] remove unused T2OutlineExtractor.hints attribute 2017-02-15 11:10:34 -08:00
Behdad Esfahbod
65f0f98dba [subset.CFF] Drop empty subroutines 2017-02-15 01:17:26 -08:00
Behdad Esfahbod
079e10f31b [subset] Refactor code; hopefully didn't break it! 2017-02-15 00:52:55 -08:00
Behdad Esfahbod
8f03413aef [subset] Fix for 1ec6d30aa9b03ee40148ae8115848340ffd852a1 2017-02-15 00:33:37 -08:00
Behdad Esfahbod
32f2d6c3e8 Revert "[subset] Minor; towards refactoring"
This reverts commit 2348522167838132c06b0eecbce9c77e2ca07d02.
2017-02-14 23:52:38 -08:00
Behdad Esfahbod
684cdeef41 Revert "[subset] Minor; towards refactoring"
This reverts commit 697811178503edefd7c1f00ae8a8dcebf32d8fbb.
2017-02-14 23:52:24 -08:00
Behdad Esfahbod
2a171c852b Revert "[subset] Minor; towards refactoring"
This reverts commit 17dfafdd158c59cb34d15a2dd2f37db1d6f7b68b.
2017-02-14 23:52:18 -08:00
Behdad Esfahbod
17dfafdd15 [subset] Minor; towards refactoring 2017-02-14 23:49:02 -08:00
Behdad Esfahbod
6978111785 [subset] Minor; towards refactoring 2017-02-14 23:44:17 -08:00
Behdad Esfahbod
2348522167 [subset] Minor; towards refactoring 2017-02-14 23:42:45 -08:00
Behdad Esfahbod
e4a853466d [subset] Adjust comment for previous fix 2017-02-14 23:25:37 -08:00
Cosimo Lupo
3ae59d3dce
[subset] minor: use for ... else 2017-02-14 22:56:48 -08:00
Behdad Esfahbod
0fd22766b8 Merge pull request #709 from anthrotype/cff-dehint-2
[subset] second attempt at fixing --no-hinting with CFF
2017-02-14 22:05:25 -08:00
Sascha Brawer
eac7ef89c0 [feaLib] Make nameid parsing more robust
We now correctly handle nameid statements with surrogate pairs and
old-style macOS-encoded names (provided that fonttools supports the
specified encoding).

Resolves https://github.com/fonttools/fonttools/issues/842.
2017-02-14 14:28:10 +01:00
Sascha Brawer
b22df7ff48 [feaLib]Escape nameid strings when writing feature files
https://github.com/fonttools/fonttools/issues/780
2017-02-14 11:02:12 +01:00
Miguel Sousa
75133fc4d1 [feaLib] Make include() work like makeotf 2017-02-13 08:42:03 +01:00
Cosimo Lupo
78d11e3a0f
Bump version: 3.7.0 → 3.7.1.dev0 2017-02-11 10:04:59 -08:00
Cosimo Lupo
9207b1397a
Release 3.7.0 2017-02-11 10:02:58 -08:00
Sascha Brawer
706858646a Preserve ordering of glyph alternates when round-tripping through TTX
Also fixes a bug where glyph alternates in MTI feature files were
wrongly sorted by glyph name. After this change, the output is using
the same ordering as in the input MTI feature file.

Fixes https://github.com/fonttools/fonttools/issues/833.
2017-02-11 17:08:56 +01:00
Sascha Brawer
b31ed09421 Support glyph names with dashes
The OpenType Feature File Syntax has been changed to support dashes:
https://github.com/adobe-type-tools/afdko/issues/152

Resolves https://github.com/fonttools/fonttools/issues/559.
Needed for https://github.com/googlei18n/fontmake/issues/249.
2017-02-11 15:57:17 +01:00
Behdad Esfahbod
d7e8af9510 [varLib] Fix regression where GPOS values were stored as 0
Another fallover from merging of VariationMerger and InstancerMerger.

New code is closer to the selfless merger we want to have.

Fixes https://github.com/fonttools/fonttools/issues/834
2017-02-09 19:35:24 -08:00
Behdad Esfahbod
d801056100 [varLib] Allow merging of class-based kerning when ClassDef1's are different
This should allow building varfonts for a whole class of font sources
that failed so far.
2017-02-08 14:29:02 -08:00
Behdad Esfahbod
9544a538ee [varLib] Minor rename in prep for ClassDef1 merging 2017-02-08 14:14:08 -08:00
Behdad Esfahbod
dc07fe4f8f [varLib] Allow merging of class-based kerning when ClassDef2's are different
With this, we can build varfont for NotoSansThai and a couple more.

This is the first use of fontTools.misc.classifyTools module.
2017-02-07 16:09:14 -08:00
Erik
22ce159ecd Merge remote-tracking branch 'origin/relative-paths'
# Conflicts:
#	Lib/designSpaceDocument/__init__.py
2017-02-06 22:35:55 +01:00
Erik
6ba727bed3 More testcases for the relaive path processing. 2017-02-06 22:33:03 +01:00
Cosimo Lupo
2ebd861eff
Bump version: 3.6.3 → 3.6.4.dev0 2017-02-06 13:40:40 +00:00
Erik
1dd261f6e6 Add comment. 2017-02-06 14:40:20 +01:00
Cosimo Lupo
41d8d2a309
Release 3.6.3 2017-02-06 13:22:48 +00:00
Erik
6e724af43b Clarified how designSpaceDocument object handles the filename and path attributes of the descriptors. 2017-02-06 14:17:56 +01:00
Erik
e102c5e992 Tests to verify the handling of filename and path attrs. 2017-02-06 10:29:59 +01:00
Behdad Esfahbod
ef0eb9dc8f [varLib] Move code around 2017-02-05 18:52:27 -08:00
Behdad Esfahbod
b5c34ceb15 [varLib] Fix building variation of PairPosFormat2
I broke this with a738464f775c190bf70e26d0a32ff2344ec43201
Ouch!
2017-02-05 18:48:15 -08:00
Erik
13abae94c5 New "filename" attribute for source and instance descriptor objects that contains the relative path to the ufo.
So we have:
descriptor.filename: the path to the UFO, relative to the documentpath
descriptor.path: the resolved, absolute path to the UFO

This means we have to be aware of  a couple of situations, described in updatePaths() and testPatgNameResolve().
Case 1: both filename and path attributes are None. Action: write the descriptor as is, without filename attr.
Case 2: filename attribute points somewhere, but the path attribute is None. So we can't actually verify if the UFO really exists, but we don't have to. Action: write the filename attribute as is. We could calculate a new path though.
Case 3: filename attribute is None, path attribute has a path. So there is no legacy value for filename that we need to look out for. Action: we can calculate a new relative path and store that in filename.
Case 4: filename and path attributes are not None, but they're in conflict, pointing to different places/ So the absolute path of the UFO and the absolute path of the document produce a different relative path than is stored in filename. One of them must be wrong.

When a new filename is set, make sure to set the path attribute to None and vice versa.
2017-02-04 18:17:20 +01:00
Erik
dc483f9c17 Not sure why this string does not compare, but it is not vital and I want the tests to be clear. 2017-02-04 15:16:00 +01:00
Erik
91d4b89cd0 filename attr to store the actual string of the relative path. path attr to store the absolute path to the file (if we can find it) 2017-02-04 10:30:03 +01:00
Behdad Esfahbod
e45297bf4b Populate defaults even for tables that have postRead
Implement custom populateDefaults for them.
2017-02-03 14:33:57 -08:00
Behdad Esfahbod
b887860b65 Fix compiling of MultipleSubstFormat1 with zero out glyphs
str.split('') returns [''], whereas we expect [].
Fix that.
2017-02-02 15:49:09 -08:00
Cosimo Lupo
41099fd376
Bump version: 3.6.2 → 3.6.3.dev0 2017-01-30 17:25:52 +00:00
Cosimo Lupo
d67135852f
Release 3.6.2 2017-01-30 17:24:57 +00:00
Cosimo Lupo
3717dc6549
[varLib.merger] set initializer for reduce() to handle empty sequences; import reduce from functools for py3
When reduce() receives an empty sequence, it raises TypeError, unless it is given a third 'initializer' argument

ValueFormat values should default to 0, so we shall use that as initializer.

Also, the reduce() built-in is no longer available on Python 3.
It's still accessible for both py2 and py3 from functools.

Fixes https://github.com/googlei18n/fontmake/issues/241
2017-01-30 16:51:41 +00:00
Erik
146bcd078d Option to only process specific glyphnames in ufoProcessor. 2017-01-29 11:56:17 +01:00
Cosimo Lupo
1cf852bb3f
Bump version: 3.6.1 → 3.6.2.dev0 2017-01-28 16:16:25 +00:00
Cosimo Lupo
0617123053
Release 3.6.1 2017-01-28 16:01:32 +00:00
Cosimo Lupo
972b3e6a15
[py23] handle exception at shutdown in 'lastResort' logging handler
On python2.7, the fonttools py23 module registers a 'lastResort' StreamHandler
similar to the one found in python3's logging module, that always writes
to the current value `sys.stderr`.

This also applies to any python library that imports from fontTools.misc.py23
under python2.7.

The logging module has a 'shutdown' atexit handler that flushes all the
logging handlers' streams just before the python interpreter exits.

Sometimes (e.g. when calling `python setup.py test` as in MutatorMath's test
suite), the interpreter termination ends with a traceback, which is
triggered by the atexit handler failing to flush the lastResort handler's
stream, sys.stderr

AttributeError: None has no attribute 'stderr'

This is because during module teardown, the globals (in this case 'sys')
are set to None, and the order in which modules are deleted is not
guaranteed.

See 58531934a8
2017-01-28 14:18:29 +00:00
Cosimo Lupo
d8c40583d1
[agl] ensure AGL glyph names are 'str' type
We are using unicode_literals in this module since 329261b.
Because of that, on py27 sometimes a TTFont glyphOrder may end up with
a mix of `str` and `unicode` glyph names.
While I'd love to change every single 'text' string to unicode, maybe
in this case it makes sense to use the native `str` type (`bytes` on
py2, unicode string on py3) for the UV2AGL and AGL2UV dictionaries, as
glyph names can only contain ascii characters anyway.

See https://github.com/fonttools/fonttools/pull/774#discussion_r98327429
2017-01-28 11:48:51 +00:00
Cosimo Lupo
a9dcf1c1b0
Bump version: 3.6.0 → 3.6.1.dev0 2017-01-26 19:52:25 +00:00
Cosimo Lupo
18b6459ce2
Release 3.6.0 2017-01-26 19:50:17 +00:00