6764 Commits

Author SHA1 Message Date
pyup-bot
901eaf41c1 Update scipy from 1.2.0 to 1.2.1 2019-02-11 16:14:08 +01:00
Miguel Sousa
113a4c2585
Merge pull request #1497 from fonttools/fealib-main-tables
[feaLib] Add 'tables' option to __main__.py
2019-02-11 00:41:39 -08:00
Miguel Sousa
17b2108666 [feaLib] Add 'tables' option to __main__.py
Relates to #1159
2019-02-10 22:27:26 -08:00
Khaled Hosny
c3f3606c59 [feaLib] Allow hyphen in glyph class names
Matches AFDKO’s makeotf behaviour.
2019-02-10 14:31:37 +02:00
Rod Sheeter
199aa9e24b Rudimentary decimal support 2019-02-08 14:59:28 -08:00
Rod Sheeter
1e70458679 More simple shape examples 2019-02-08 13:11:33 -08:00
Rod Sheeter
d910ba371b Wire SVGPath to import other shapes 2019-02-08 11:37:00 -08:00
Rod Sheeter
1292029be2 test for basic rounded rect 2019-02-08 10:50:22 -08:00
Rod Sheeter
f0e8e72187 Test wiring for <rect> import 2019-02-08 10:06:14 -08:00
Cosimo Lupo
173a0f5011 [C_P_A_L_] make Color a subclass of namedtuple
so that's comparable/hashable/immutable and can be used as key in a dict or set.

The fromXML instance method was dropped since it relied on the object being mutable.
A fromHex classmethod replaces it.
2019-02-08 01:16:47 +01:00
Read Roberts
4de8342310
Merge pull request #1490 from anthrotype/fix-subset-desubroutinize
[subset] Fix 'AttributeError: GlobalSubrs' with --desubroutinize option
2019-02-06 20:18:08 -08:00
Cosimo Lupo
8e8da97a4c [cffLib]: add clear() method to Index class to empty in-place 2019-02-07 01:58:22 +01:00
Cosimo Lupo
97006a0d67 [subset] Fix 'AttributeError: GlobalSubrs' with --desubroutinize option
Fixes #1483

'remove_unused_subroutines' method expects a 'GlobalSubrs' attribute but the 'desubroutinize'
method deletes it. We don't have to call 'remove_unused_subroutines' at the end of 'desubroutinize'
method, we can just delete all the local subroutines, and clear the GlobalSubrsIndex.

Only call 'remove_unused_subroutines' method once, when we are not desubroutinizing.
2019-02-07 01:51:05 +01:00
Cosimo Lupo
027501cc26 .travis.yml: need to use 'dist: xenial' for pypy 6.0 2019-02-06 22:27:17 +01:00
Cosimo Lupo
74d683d04b .travis: use pypy2.7-6.0
5.8.0 seems to be no longer available on travis.
this should be the latest one currently available.
https://travis-ci.org/fonttools/fonttools/jobs/489641018
2019-02-06 22:19:07 +01:00
Nikolaus Waxweiler
bc9d6c6b36
Merge pull request #1489 from madig/cffLib-PrivateDict-refactor-getattr
[cffLib] Replace `PrivateDict.__getattr__` with property for `in_cff2`
2019-02-06 17:03:59 +00:00
Nikolaus Waxweiler
a8d4bfc42d Replace PrivateDict.__getattr__ with property
The dunder method doesn't seem to be doing anything other than providing
an `in_cff2` attribute. Do that with a property instead of bending
__getattr__.

This one confused me when I was working on
https://github.com/fonttools/fonttools/pull/1488.
2019-02-06 10:15:38 +00:00
Cosimo Lupo
649dc49dba [cffLib] Fix RecursionError in BaseDict.__getattr__ when unpickling
We need to raise AttributeError for non-existing dunder methods like
'__deepcopy__' or '__getstate__', because deepcopy() and pickle.load()
test for these on the instance using getattr() and treat the resulting
AttributeError as a signal that the object doesn't implement these custom
hooks. If we don't do that, we enter an infinite recursion as we attempt
to look up the missing dunder methods in the 'rawDict' dictionary,
because 'rawDict' is set inside __init__, but __init__ is not invoked
while unpickling (only __new__ is); thus self.rawDict is also missing
and __getattr__ is invoked with argument 'rawDict' again and again until
it crashes with RecursionError. Phew.

Fixes https://github.com/fonttools/fonttools/pull/1488
2019-02-06 01:05:11 +01:00
Cosimo Lupo
8832062c40
Merge pull request #1488 from madig/fix-cff-deepcopy
WIP: Fix deepcopy-ing of CFFs
2019-02-06 01:00:39 +01:00
Nikolaus Waxweiler
e50733df21 Make simpler test in cffLib tests 2019-02-05 14:33:58 +00:00
Nikolaus Waxweiler
3011f3b7d4 Add smoke-test for layout interpolation of OTFs 2019-02-05 13:57:01 +00:00
Nikolaus Waxweiler
8bff72139c Reinstate fixed load_masters() 2019-02-05 13:02:53 +00:00
Nikolaus Waxweiler
9739dc7d86 Bump version: 3.37.3 → 3.37.4.dev0 2019-02-05 12:50:18 +00:00
Nikolaus Waxweiler
e90d6f3166 Release 3.37.3 2019-02-05 12:50:17 +00:00
Nikolaus Waxweiler
b517d95b77
Merge pull request #1487 from madig/rechange-lineendings-to-lf
Rechange line-endings of some files from DOS to Unix
2019-02-05 12:49:40 +00:00
Nikolaus Waxweiler
45cc01a1d1 Add .gitattributes to enforce native line-endings 2019-02-05 12:11:25 +00:00
Nikolaus Waxweiler
6c0bcb9073 Convert line-endings back from DOS to Unix 2019-02-05 12:10:51 +00:00
Nikolaus Waxweiler
3892493fc5 Bump version: 3.37.2 → 3.37.3.dev0 2019-02-05 11:41:23 +00:00
Nikolaus Waxweiler
26da00ee54 Release 3.37.2 2019-02-05 11:41:21 +00:00
Nikolaus Waxweiler
1e746e34ee
Revert "load_masters: actually assign font attributes" (#1486)
* Revert "load_masters: actually assign font attributes"

This reverts commit ef1d4cd02d1e46f5dac3914f547a6e4275cf3077, which caused a
crash in `interpolate_layout()` when `deepcopy`ing OTFs.

Amend code and tests while I work on a real fix.
2019-02-05 11:38:46 +00:00
Khaled Hosny
b68596cc80 [feaLib] Add an ast test for the previous commit 2019-02-05 13:10:33 +02:00
Khaled Hosny
83434b4286 [feaLib] Escape glyph names matching keywords
Glyph names matching reserved keywords were not consistently escaped;
they were escaped in GDEF classes but not elsewhere. Call module’s
asFea() function in GlyohName.asFea() to ensure they are consistently
escaped.
2019-02-05 13:10:33 +02:00
Khaled Hosny
a291e9a2f1 [feaLib] Add table names to reserved keywords
Apparently AFDKO expects these to be escaped in glyph names.
2019-02-05 13:10:33 +02:00
Denis Moyogo Jacquerye
303c7247e1 Bump version: 3.37.1 → 3.37.2.dev0 2019-02-05 09:26:05 +00:00
Denis Moyogo Jacquerye
adbec1fb91 Release 3.37.1 2019-02-05 09:26:05 +00:00
Nikolaus Waxweiler
0322f2dc0b
Merge pull request #1485 from madig/update-changelog
Update changelog [skip ci]
2019-02-05 09:24:21 +00:00
Nikolaus Waxweiler
02a2d9f184 Update changelog [skip ci] 2019-02-05 09:18:10 +00:00
Khaled Hosny
05329ed033 [feaLib] Fix double indentation of markClass
When a MarkClassDefinition is inside a block, it gets double indentation
compared to the rest of the block. It should ignore the indent argument
like other similar statements.
2019-02-05 00:46:58 +02:00
Nikolaus Waxweiler
376b904352
Merge pull request #1477 from madig/varLib-sparse-master-MVAR-generation
[varLib] Fix MVAR generation for sparse masters

Also actually assign loaded fonts to the `.font` attribute in `load_masters`.
2019-02-04 16:48:33 +00:00
Nikolaus Waxweiler
63a56b98fd _add_MVAR: set model only once, after a tables have been fetched 2019-02-04 16:03:47 +00:00
Denis Moyogo Jacquerye
5e3f3eded1
Merge pull request #1469 from khaledhosny/voltlib-coverage
[voltLib] Return a tuple from parse_coverage_()
2019-02-02 07:45:21 +00:00
Khaled Hosny
cedf79b505 [voltLib] Return a tuple from parse_coverage_()
This is a followup to commit 94633e9f46975c356ec3a2d21ed30768c2fa0cd5,
where I mistakenly made it return an Enum but parse_coverage_() it not
used only for ENUMs and in many (most?) places returning an Enum is
wrong as you have a list of separate items that has to rmain separate.
2019-02-02 01:13:14 +02:00
Nikolaus Waxweiler
ef1d4cd02d load_masters: actually assign font attributes 2019-01-30 15:15:28 +00:00
Chris Simpkins
1c0a55905b [Snippets] added usage documentation as a Markdown block in the notebook 2019-01-29 23:55:51 -05:00
Chris Simpkins
33b03e3edd [Snippets] add name-viewer.ipynb jupyter notebook 2019-01-29 23:30:49 -05:00
Cosimo Lupo
7d975f7ada
Bump version: 3.37.0 → 3.37.1.dev0 2019-01-28 21:56:19 +00:00
Cosimo Lupo
2def727585
Release 3.37.0 2019-01-28 21:56:18 +00:00
Cosimo Lupo
6755c2dffa
Update changelog [skip ci] 2019-01-28 21:56:05 +00:00
Khaled Hosny
354b89c068 [feaLib] Implement ValueRecord.asFea()
ValueRecord had a makeString() method that takes an optional “vertical”
argument, but no code outside the tests sets this argument. Renamed it
to asFea() and dropped the “vertical”, so that it consistent with the
rest of feaLib.ast classes.
2019-01-28 11:52:36 +02:00
Khaled Hosny
e974ea3871 [feaLib] Add tests for ValueRecordDefinition.asFea()
Currently fail as it calls ValueRecord.asFea() which is not implemented.
2019-01-28 11:52:36 +02:00