6549 Commits

Author SHA1 Message Date
pyup-bot
0b4663379f Update scipy from 1.1.0 to 1.2.0 2018-12-31 15:07:07 +00:00
Just van Rossum
327b05d8c0
[designspaceLib] [t1Lib] [misc.macRes] fix some cases where pathlib.Path objects were not accepted (#1421)
* fix two cases where pathlib.Path objects were not accepted

* make macRes reader accept os.PathLike objects

* use __fspath__ explicitly to support os.PathLike paths

* use __fspath__ explicitly to support os.PathLike paths

* convert tmpdir to str

* only test pathlib.Path on Python 3.6 and up
2018-12-30 12:07:05 +01:00
Cosimo Lupo
560c7558c8
SFNTReader: try deepcopy'ing first, if fails do manual copy of file contents 2018-12-20 14:28:17 +00:00
Cosimo Lupo
4001ded199
override SFNTReader __deepcopy__ for 'file' isn't copyable; use it in varLib 2018-12-20 14:18:59 +00:00
Cosimo Lupo
9b4509496f
interpolate_layout: allow to pass DesignSpaceDocument as input, like varLib.build 2018-12-20 13:00:45 +00:00
Cosimo Lupo
6f317aa362
ttFont: add copy() method that return new instance with same data
and use it in varLib to copy master font
2018-12-20 12:47:43 +00:00
Cosimo Lupo
04d506072c
rename _ensure_sources to load_masters, misc refactor 2018-12-20 12:28:31 +00:00
Nikolaus Waxweiler
596b2cef80 Extract Designspace font loader into own function 2018-12-20 08:53:28 +00:00
Nikolaus Waxweiler
79835176f3 Remove unused variable 2018-12-19 18:47:00 +00:00
Nikolaus Waxweiler
31c15b7c0e Minor reorganization 2018-12-19 18:39:47 +00:00
Nikolaus Waxweiler
67d1f3598a Be clever in what we accept
See https://github.com/fonttools/fonttools/pull/1416#issuecomment-448674815
2018-12-19 18:29:34 +00:00
Nikolaus Waxweiler
e464e450ac Make build and load_designspace accept a DS object 2018-12-19 13:40:11 +00:00
Behdad Esfahbod
8e080f2a82 [varLib] Fix merging of multiple PairPosFormat2 subtables
We should invert each ClassDef1 against its own sublookup Coverage,
not the combined one.  Oops!

Fixes https://github.com/fonttools/fonttools/issues/1411
2018-12-19 06:34:40 -05:00
Nikolaus Waxweiler
621c652ad0
[designspaceLib] Documentation: Clarify what min/max/default on an AxisDescriptor mean (#1395)
Clarify that the axis properties refer to user space coordinates
2018-12-19 11:24:07 +00:00
Denis Moyogo Jacquerye
f998688c00
Merge pull request #1413 from moyogo/STAT-1.1
Pin STAT to version 1.1
2018-12-17 20:30:32 +00:00
Cosimo Lupo
4a153333f2
README: add note about timeline of py2.py3 support
as discussed in https://github.com/fonttools/fonttools/issues/765#issuecomment-446994251
2018-12-17 18:44:18 +00:00
Cosimo Lupo
2f2ccdc2c6
Bump version: 3.34.2 → 3.34.3.dev0 2018-12-17 13:37:11 +00:00
Cosimo Lupo
ad30eeffc8
Release 3.34.2 2018-12-17 13:37:11 +00:00
Cosimo Lupo
fde8e31069
Update NEWS.rst 2018-12-17 13:36:55 +00:00
Cosimo Lupo
135a4a1914
[merge] Fix AssertionError when all DefaultLangSys offsets are NULL
Fixes https://github.com/fonttools/fonttools/issues/1408#issuecomment-447316250
2018-12-17 13:30:47 +00:00
Cosimo Lupo
74ec7cec2a
Bump version: 3.34.1 → 3.34.2.dev0 2018-12-17 13:16:01 +00:00
Cosimo Lupo
1dbfb09587
Release 3.34.1 2018-12-17 13:16:00 +00:00
Jens Kutilek
b8ae79cc09
Update NEWS.rst 2018-12-17 14:08:34 +01:00
Behdad Esfahbod
9c3dde3ce6 [varLib] Always write tuple entries for composite glyphs (#1383)
* [varLib] Always write tuple entries for composite glyphs

Fixes https://github.com/fonttools/fonttools/issues/1381
Fixes https://github.com/googlei18n/fontmake/issues/481 partially

* Make sure at least one gvar delta is written for composites

* Add test data for composite fix

* Put in the correct issue link

* Typo

* Fix typos

* Expand comment, add link to issue

* Add ttx files for test font
2018-12-17 14:03:40 +01:00
Denis Moyogo Jacquerye
c48a7b94c1 [varLib] downgrade STAT to version=0x00010001 in tests 2018-12-17 10:31:35 +00:00
Denis Moyogo Jacquerye
acd2a61543 [varLib] downgrade default STAT version=0x00010001 2018-12-14 15:04:32 +00:00
Cosimo Lupo
6e1e0b73f1
Bump version: 3.34.0 → 3.34.1.dev0 2018-12-14 11:19:05 +00:00
Cosimo Lupo
c14701c820
Release 3.34.0 2018-12-14 11:19:04 +00:00
Cosimo Lupo
1fdc055294
Merge pull request #1409 from madig/update-changelog-3.34.0
Update changelog [skip ci]
2018-12-14 10:36:39 +00:00
Nikolaus Waxweiler
305b1ee2c5 Update changelog [skip ci] 2018-12-14 10:31:19 +00:00
Cosimo Lupo
fa69bb0d94
Merge pull request #1406 from madig/plistlib-accept-mapping-for-dict
[plistlib] Treat Mapping objects as dicts
2018-12-13 16:12:36 +00:00
Nikolaus Waxweiler
3b2bfcf29a Treat Mapping objects as dicts 2018-12-13 15:44:25 +00:00
Behdad Esfahbod
03ad219493
Merge pull request #1402 from fonttools/clean-cff2vf-2
cff2 vf fixes. Make calc_bounds work, fix subsetting bug.
2018-12-11 20:31:11 -05:00
Behdad Esfahbod
b0e8161915
Merge pull request #1405 from fonttools/clean-cff2-3
Clean cff2 3
2018-12-11 20:09:03 -05:00
ReadRoberts
3a04a73b0c [cff2 varlib subset] Clean up syntax
x != None -> x is not None.
2018-12-11 17:07:51 -08:00
ReadRoberts
ebc1b0b779 [cff2 varlib subset] Add message to assert for when a CFF2 charstring has an initial width. 2018-12-10 10:44:59 -08:00
ReadRoberts
0586c06199 [varLib subset CFF2] Set PrivateDict nominal and default WidthX to None
@bedhad
Address issues raised in #1403

I do think setting the dummy CFF2 PrivateDict nominalWidthX and defaultWidthX to None, which leads to the charstring.width also being None,  is a good idea. I originally set them to 0, which produces a charstring width of 0, in order to avoid problems with logic that assumes that the field is good for math. However, I now think that it is better to find errors around charstring type assumptions earlier than later.

 "drop_hints()" is actually not wrong - I did look at this when making the changes. For CFF2 charstrings, self.width is always equal to self.private.defaultWidthX, so the width is never inserted. This is because in psCharstrings.py::T2WidthExtractor.popallWidth(), the test "evenOdd ^ (len(args) % 2)" is alway False.  Left to myself, I would not change this code. If the CFF2 charstring is correct, there is not a problem. if the CFF2 charstring is not correct, then both in drop_hints() and in T2WidthExtractor.popallWidth(), the logic will stack dump. I did add asserts, but am not totally sure it is worth the extra calls.
2018-12-06 11:55:48 -08:00
justvanrossum
2b7656550d [fontBuilder] More varLib.builder leverage 2018-12-06 18:30:09 +01:00
Just van Rossum
a3817fd971
Merge pull request #1399 from justvanrossum/fontbuilder-cff2
[fontBuilder] some support for CFF2; inferring FontMatrix from unitsPerEm for CFF
2018-12-06 09:23:45 +01:00
ReadRoberts
c13855bdd6 cff2 vf fixes. Make calc_bounds work, fix subsetting bug.
Fixed psCharstrings so that calc_bounds will run. I would guess no-one has tried to use a BoundsPen on a CFF2 VF before - thanks to Chris Chapman. It now returns a result only for the default instance.

Fixed bug in subsetting: removed assert that a Subr is not empty after subsetting or de-hinting. CFF2 Charstrings do not have terminal "return' op.
2018-12-05 15:50:10 -08:00
Behdad Esfahbod
e05673bf16
Merge pull request #1401 from justvanrossum/test1400
[varLib.featureVars] tests for #1400
2018-12-05 13:14:39 -08:00
justvanrossum
8812f9072b tests for #1400 2018-12-05 19:54:14 +01:00
Behdad Esfahbod
37366b563e [varLib.featureVars] Fix overlap remainder logic
Fixes https://github.com/fonttools/fonttools/issues/1400
2018-12-05 10:33:35 -08:00
justvanrossum
7d64d30037 fixed typo in var name 2018-12-05 15:10:54 +01:00
justvanrossum
82c4f410fb remove empty fdArrayList argument, will be filled in 2018-12-05 15:09:27 +01:00
justvanrossum
c3fa7de615 cosmetic change 2018-12-05 15:07:58 +01:00
justvanrossum
874c08dcd2 CFF: set FontMatrix based on unitsPerEm automatically, unless manually overridden 2018-12-05 15:07:20 +01:00
justvanrossum
de1dbe5f16 some more test refactoring 2018-12-05 14:03:15 +01:00
justvanrossum
c663e7f299 refactor output verifying 2018-12-05 13:57:07 +01:00
justvanrossum
9d73327f3b Some support for CFF2 2018-12-05 13:51:42 +01:00