7859 Commits

Author SHA1 Message Date
Cosimo Lupo
09c5856428 ufo: don't drop single points in GetSegmentsPen
We dropped robofab support. There is no reason to arbitrarily
drop any contour points. Anchors are handled as anchors in
latest ufoLib+defcon, also for UFO2. No more need to special-case.
2017-10-31 18:21:20 +00:00
Cosimo Lupo
3125f071c7 pens_test: capture deprecation warning 2017-10-31 18:18:59 +00:00
Cosimo Lupo
6c22995a5f pens: deprecate 'ignore_single_points' argument
This was needed for when we were supporting the old robofab.ufoLib
where anchors were represented as single-point-with-a-name contours.
With latest ufoLib, even when glif format is 1, anchors are
stored separately and are not drawn with pens (only proper contours
and components are passed on in the draw method).
So there is no longer need to special-case single points.
It's not the job of the cu2qu pens to filter those out.
2017-10-31 17:57:53 +00:00
Cosimo Lupo
4bc88340b9 setup.cfg: set 3.0 as pytest 'minversion' 2017-10-31 17:39:23 +00:00
Sascha Brawer
d54f14e0a2 [morx] Cosmetic renaming of ligAction to action
Beyond composing ligatures, AAT finite-state transducers can also
execute insertion actions without rewriting existing glyphs. The
corresponding actions have almost the same structure as ligature
actions, so we can share a lot of the plumbing within fonttools.

This renaming is in preparation of a larger change to support `morx`
ables with insertions.
2017-10-31 16:25:41 +01:00
Cosimo Lupo
a414079f1a tests/data: add RobotoSubset-Bold.ufo
Will be used for testing fonts_to_quadratic
2017-10-31 14:11:49 +00:00
Cosimo Lupo
8e3df9a952 Remove unsupported robofab benchmark
It won't work with our UFO3, sorry...
2017-10-31 14:10:40 +00:00
Cosimo Lupo
82084874c5 Upgrade RobotoSubset-Regular.ufo to UFO 3 2017-10-31 14:10:40 +00:00
Sascha Brawer
5f03a64a57 [morx] Implement InsertionMorphAction 2017-10-31 14:34:12 +01:00
Cosimo Lupo
192c6fc0f3 MANIFEST.in: add tests/ folder to sdist 2017-10-31 13:02:15 +00:00
Cosimo Lupo
9be3901795 move Lib/cu2qu/test to tests/ folder
There is no need to install the test suite with the package.
Let's put it outside like it's recommended by pytest.
2017-10-31 12:58:09 +00:00
Cosimo Lupo
af0a06081a remove robofab imports
fonts_to_quadratic may still work with Robofab fonts, it's just
that the point pens will be imported from standalone ufoLib
2017-10-31 12:35:26 +00:00
Cosimo Lupo
4d07b533fc Move benchmark.py and ufo_benchmark.py to tools/
These modules are only useful for development, should not be installed
with the library
2017-10-31 12:35:26 +00:00
Sascha Brawer
17e627e366 [morx] Add test case for unrecognized lookup types 2017-10-31 12:50:46 +01:00
Sascha Brawer
a0b9854ef0 [morx] Emit more meaningful subtable flags
Before this change, we were emitting XML with numeric values for `morx`
coverage flags. Now, we emit XML that makes more sense to human readers.
XML files from previous versions of fonttools can still be parsed.
2017-10-31 12:50:46 +01:00
Cosimo Lupo
c754d1eea4 Add .codecov.yml to mute notifications 2017-10-31 11:23:45 +00:00
Cosimo Lupo
1f834774de README.rst: add codecov.io badge 2017-10-30 19:21:14 +00:00
Cosimo Lupo
4e7a9989d4 Combine py{2,3} coverage; upload report to codecov.io
https://codecov.io/gh/googlei18n/cu2qu

Also, run tests on python3.6 instead of 3.5.
2017-10-30 19:16:58 +00:00
Cosimo Lupo
e1d072582a
Merge pull request #101 from anthrotype/reverse-pen
use ReverseContourPen from fonttools
2017-10-30 19:02:04 +00:00
Cosimo Lupo
df10cdea05 Use fonttools' ReverseContourPen
Fixes #51
2017-10-30 18:56:02 +00:00
Cosimo Lupo
7c0ed18c6a Bump minimum required fonttools to 3.18.0
we need that for the bugfix in ReverseContourPen
https://github.com/googlei18n/cu2qu/issues/51

also bump ufoLib to >= 2.1.1, just because.
2017-10-30 18:54:00 +00:00
Cosimo Lupo
fef29c4f97
Merge pull request #100 from googlei18n/pyup-scheduled-update-10-30-2017
Scheduled weekly dependency update for week 44
2017-10-30 18:45:05 +00:00
Cosimo Lupo
e69484e030 Bump version: 3.18.0 → 3.18.1.dev0 2017-10-30 16:50:59 +00:00
Cosimo Lupo
244093b1bf Release 3.18.0 2017-10-30 16:50:26 +00:00
Cosimo Lupo
eee5ead314 Update NEWS.rst 2017-10-30 16:50:20 +00:00
pyup-bot
e2acefa4be Update ufolib from 2.1.0 to 2.1.1 2017-10-30 13:47:09 +00:00
pyup-bot
f297ebb3d9 Update fonttools from 3.13.1 to 3.17.0 2017-10-30 13:47:07 +00:00
Khaled Hosny
534326bd1d [feaLib] Fix writing back nested glyph classes
Before this change, the following glyph class:

  @Vowels = [@Vowels.lc @Vowels.uc y Y];

Would be written back as:

  @Vowels = [@Vowels.lc = [a e i o u]; @Vowels.uc = [A E I O U]; y Y];

Which is clearly invalid. It seems for GlyphClass.asFea() to work
correctly here we should be using GlyphClassName not GlyphClass
for the nested classes (similar to the code at the beginning of
parse_glyphclass_()).
2017-10-27 23:27:07 +03:00
Erik van Blokland
ab4b5be45b Also adjust the minimum and maximum values of the axis if the location of the neutral happens to be outside of it.
Tests for this behavior.
2017-10-27 15:44:23 +02:00
Erik van Blokland
bb97097534 doc.checkDefault() crossreferences the default value of each axis with the location of the master that was assigned as neutral.
- if the axis value is missing in the neutral location, add the axis and value.
- if the values are different, then use the value from the neutral location as the axis default.
2017-10-27 15:09:39 +02:00
Erik van Blokland
ff4705554c This adds a hidden flag to the axis element and axisDescriptor objects. 2017-10-27 10:23:04 +02:00
Erik van Blokland
0420951858 accomodate a logger from somewhere else. 2017-10-27 09:47:16 +02:00
Cosimo Lupo
26a2616286 [varLib_test] upldate expected results
We pass the fvar axis order to VariationModel after
645b7a8355
2017-10-26 11:25:06 +01:00
Behdad Esfahbod
645b7a8355 [varLib] Pass fvar axis order ot VariationModel()
Update expected test results.
2017-10-25 15:43:47 -06:00
Cosimo Lupo
e7a3c9282d Merge pull request #99 from anthrotype/fix-pens-stats
[pens] fix number of segments reported in stats
2017-10-25 19:07:34 +01:00
Cosimo Lupo
c21ee24eec [pens_test] fix test_stats test
This test would have failed with the incorrect count.
2017-10-25 19:05:40 +01:00
Cosimo Lupo
13abea3ca5 [pens] fix number of segments reported in stats
It appears we were reporting the 'stats' differently in the pens and
in the main ufo module.

https://github.com/googlei18n/cu2qu/blob/7a2f638/Lib/cu2qu/ufo.py#L148

You can git blame me, sorry.
Funny how it's been broken for almost two years :)
2017-10-25 18:49:19 +01:00
Behdad Esfahbod
3fbc4688eb [varLib.mutator] Drop GDEF is nothing left in it
Part of fixing https://github.com/fonttools/fonttools/pull/1079#issuecomment-338710803
2017-10-25 11:58:44 -04:00
Behdad Esfahbod
0b5a923ef8 [varLib.mutator] Fix mutating of ValueRecord objects
Part of fixing https://github.com/fonttools/fonttools/pull/1079#issuecomment-338710803
2017-10-25 11:58:32 -04:00
Behdad Esfahbod
69bbddea92 [varLib.mutator] Correctly unset Device entries that are None
Part of fixing https://github.com/fonttools/fonttools/pull/1079#issuecomment-338710803
2017-10-25 11:58:32 -04:00
Sascha Brawer
18fae34cad [morx] Make sure that morx subtables have the expected length 2017-10-25 15:35:56 +02:00
Sascha Brawer
5316bb83b6 [morx] Use a sub-reader when decoding AAT ligatures
Since the AAT ligature subtable does not encode the number of ligature
glyphs, we need to infer this from the total structure length. We pass
this around by creating a custom sub-reader that only has the substruct
as its data. There might have been easier ways to accomplish this, but
we should anyway change the XML output for MorxSubtables to use custom
flag names, similar to what we're already doing for flags of morph actions.
Having a custom converter for MorxSubtables is in preparation for that
later XML format change.
2017-10-25 15:35:56 +02:00
Sascha Brawer
1ac4a020ec [morx] Handle morx ligature substitution rules 2017-10-25 15:35:56 +02:00
Sascha Brawer
b6317ce60a [morx] Handle the ligature list components sub-table 2017-10-25 15:35:56 +02:00
Sascha Brawer
d7d94d7b02 [morx] Fix broken unit tests for morx subtables 2017-10-25 15:35:56 +02:00
Sascha Brawer
86454e79de [morx] Compile ligature actions subtable for AAT ligatures
Tests fail because other subtables still need to be implemented.
2017-10-25 15:35:56 +02:00
Sascha Brawer
04f01f245b [morx] Use the same value for testing as in specification comments
The hexdump in the specification is wrong, but the correct value
is in the comments. Before this change, the finite-state transducer
in our test data could be decompiled but would not implement the
behavior explained in the AAT specification.
2017-10-25 15:35:56 +02:00
Sascha Brawer
d373808341 [AAT] Decode the morx ligature actions table 2017-10-25 15:35:56 +02:00
Sascha Brawer
a7ddb0b609 [AAT] Decode morx tables with ligature substitutions
Only handling those parts that are shared with other substitution types.
The actualy ligature actions are not implemented yet.
2017-10-25 15:35:56 +02:00
Erik van Blokland
9082e95ed1 Merge pull request #23 from belluzj/master
Enforce forward slashes as path separators
2017-10-25 13:16:22 +02:00