4603 Commits

Author SHA1 Message Date
Cosimo Lupo
b2cd8178dd [travis] export a different PYENV_ROOT
https://travis-ci.org/fonttools/fonttools/jobs/290377841#L506
2017-10-20 12:02:21 +02:00
Cosimo Lupo
78eb7ebc5d [travis] also test on python 2.7.6
We install python 2.7.6 using pyenv.

This should help us catch issues like this earlier
https://github.com/fonttools/fonttools/issues/993
2017-10-20 11:47:31 +02:00
Cosimo Lupo
3a97f425b8 [sstruct] handle format strings with unicode_literals
properly fixes issue with struct module in python < 2.7.7

https://github.com/fonttools/fonttools/issues/993
2017-10-20 11:09:04 +02:00
Behdad Esfahbod
cca7a79018 [varLib] Adjust for supportScalar() default ot=True change
Fixup for 028ed0125244531215d4d774474d929acda14d49
2017-10-19 10:07:08 -07:00
Behdad Esfahbod
7e34ce6082 Whitespace 2017-10-19 09:54:32 -07:00
Cosimo Lupo
9d08673c2f [_n_a_m_e] pass bytes to struct when using unicode_literals
Before Python version 2.7.7, the struct.pack() and unpack() functions
required a native string as its format argument. For example:

Passing unicode strings as the struct pack/upack format would raise:

TypeError: Struct() argument 1 must be string, not unicode.

This error occurs when we use `from __future__ import unicode_literals`.

This problem was fixed in Python 2.7.7. Since then, struct now also
accepts unicode format strings.

Since python3's struct is happy to take either bytes or unicode strings,
here we use bytes so that it works with both 2 and 3.

Also see http://pythen-future.erg/stdlib_incompatibilities.html#struct-pack

Fixes https://github.com/fonttools/fonttools/issues/993
2017-10-19 14:03:24 +02:00
justvanrossum
2f6ec32ff0 oops, forgot to adapt doctests; thanks @anthrotype\! 2017-10-18 10:29:19 +02:00
justvanrossum
028ed01252 set default value of the ot argument to True, as discussed in a1629fa52b 2017-10-18 10:04:42 +02:00
Behdad Esfahbod
9d4991e20c [varLib] Move MVAR data table to varLib.mvar 2017-10-17 11:09:50 -07:00
Cosimo Lupo
84abdf8fd1 Bump version: 3.17.0 → 3.17.1.dev0 2017-10-16 18:38:25 +02:00
Cosimo Lupo
e512d8ddd4 Release 3.17.0 2017-10-16 18:37:05 +02:00
Cosimo Lupo
323bddad59 [travis] test on python 3.5 instead of 3.6 on osx
That's the one which is installed with `brew install python3` when
we don't update Travis' homebrew.

3.5 is good enough, we already test 3.6 on Linux anyway, and most
developers run test locally on their macs with python3.6 anyway
2017-10-16 11:22:35 +02:00
Cosimo Lupo
fba91d4f58 [travis] disable homebrew auto-update to speed up osx build
export HOMEBREW_NO_AUTO_UPDATE=1

https://github.com/Homebrew/brew/blob/master/Library/Homebrew/manpages/brew.1.md.erb#L194-L196
2017-10-16 11:08:00 +02:00
Behdad Esfahbod
f284b733a9 [varLib] Move IUP code into fontTools.varLib.iup 2017-10-15 18:16:01 -04:00
Cosimo Lupo
ca7c35900b [mutator] Add instantiateVariableFont public function
Towards addressing https://github.com/fonttools/fonttools/issues/1070

The new instantiateVariableFont function takes a variable TTFont and a
dictionary of axes locations and returns a static TTFont instance.

The current code modifies the varfont in-place. To adapt it for
generating multiple instances from the same varfont, for now I simply
resorted to making a copy (can be optionally disabled by setting
inplace=True).

Also, replaced print() with log.info().
2017-10-15 17:43:06 +02:00
Cosimo Lupo
67f0dbdc31 Update NEWS.rst 2017-10-15 15:22:59 +02:00
Cosimo Lupo
76e49d6ff5 rename SVGPen to SVGPathPen
This is to make clear that the pen deals specifically with SVG "path" element, not all SVG.
2017-10-15 15:18:35 +02:00
Khaled Hosny
2a69b4b619 I don’t think this rounding is needed 2017-10-15 14:24:14 +03:00
Khaled Hosny
0355d967a0 Add SVGPen
Copied and slightly adapted from:
https://github.com/typesupply/ufo2svg/blob/master/Lib/ufo2svg/svgPathPen.py
2017-10-15 14:24:14 +03:00
Cosimo Lupo
0df9b989be [boundsPen] add init() method to reset ControlBoundsPen
So one can reuse the same pen instance to compute the bounds of more than one glyph in a glyphset, by calling pen.init() before each glyph.draw(pen)
2017-10-13 11:49:36 +01:00
Cosimo Lupo
704e26b41d [glyf] enable OVERLAP_COMPOUND composite flags
it might be deprecated or ignored in some rasterizers, but I don't
see why we should discard it, if it's present in the input font.

This also allows to set the flag, which may turn out to be useful
in some circumstances.

cf. https://github.com/googlei18n/fontmake/issues/253#issuecomment-335600887
2017-10-12 18:42:01 +01:00
Cosimo Lupo
739075e245 Update NEWS.rst 2017-10-12 15:52:54 +01:00
Cosimo Lupo
5216d1dbec [travis] do a brew update before installing py36 on mac
Apparently, this should fix https://github.com/fonttools/fonttools/issues/1068

let's see...
2017-10-12 15:34:49 +01:00
Cosimo Lupo
b110d9d624 Revert "[Travis] simply comment-out osx python3.6 build"
This reverts commit d4af7c84c01af8f89bcd8a7c0ea83462b7249ace.
2017-10-12 15:32:48 +01:00
Cosimo Lupo
b4f0986d2e Merge pull request #1071 from anthrotype/reverse-pen
add ReverseContourPen
2017-10-12 12:03:01 +01:00
Cosimo Lupo
3f933548b8 [filterPen] clarify ContourFilterPen doesn't touch components 2017-10-12 11:16:43 +01:00
Jens Kutilek
161a2a393d Update NEWS.rst 2017-10-12 10:41:17 +02:00
Jens Kutilek
a25a401fd2 Merging TT hinting (#1069)
Merge cvts; copy fpgm, prep, glyf programs from base master if compatible.
2017-10-12 10:40:40 +02:00
Cosimo Lupo
3bbba21f1f [reverseContourPen_test] unit tests for ReverseContourPen
For comparison, I also include tests for the ufoLib pen.
They are skipped if ufoLib is not importable.
2017-10-11 21:13:23 +01:00
Cosimo Lupo
021de9963b [reverseContourPen] add ReverseContourPen
A filter pen that passes outline data to another pen, but reversing
the winding direction of all contours.

Like ufoLib's ReverseContourPointPen, but using segment-wise pen
interface, without additional point/segment converters, and without
ufoLib.

627f997ddb/Lib/ufoLib/pointPen.py (L327-L406)
2017-10-11 21:13:23 +01:00
Cosimo Lupo
ccf7ab3ab1 [filterPen] add ContourFilterPen
A filter pen that accumulates contour data, passes it through a
`filterContour` method as the contour is closed or ended, and
draws the result with the output pen.
2017-10-11 21:13:23 +01:00
Cosimo Lupo
8afa763ad2 [arrayTools] fix mixed indentation
This particual file originally contained spaces, so we revert to that...
sorry.
2017-10-11 21:13:23 +01:00
Cosimo Lupo
558dad9028 [arrayTools] add function to iterate over pairs in iterable 2017-10-11 20:43:08 +01:00
Behdad Esfahbod
ab02ce49d3 Implement more ops for arrayTools.Vector
Would be nice to add tests for these...
2017-10-10 13:06:15 +02:00
Behdad Esfahbod
c91f0323db Rename CVTValues to arrayTools.Vector
This is generic, and useful in other cases.
2017-10-10 12:43:15 +02:00
Jens Kutilek
974eb08810 Update NEWS.rst 2017-10-10 12:21:31 +02:00
Jens Kutilek
f874cf6542 Merge pull request #1067 from fonttools/varlib-mutator-cvar
Add interpolation of cvt/cvar table
2017-10-10 12:17:06 +02:00
Jens Kutilek
55cda3901c Only emit a cvar tuple if any delta is not zero. 2017-10-09 17:30:27 +02:00
Jens Kutilek
8cc0df85c5 Merge branch 'master' into varlib-mutator-cvar 2017-10-09 15:21:26 +02:00
Cosimo Lupo
d4af7c84c0 [Travis] simply comment-out osx python3.6 build
I gave up.. too complicated to configure 'allow_failures' without
messing things up.
2017-10-09 14:11:46 +01:00
Cosimo Lupo
1d9305dc08 Revert "[Travis] temporarily let osx python3.6 build fail"
This reverts commits 3693309c651e07f90a95157ec097f81fb6a7def5,
eba71efeecc2702081fb17c6091f70bf0545108f and 5ae9ce60c6a122f27d001fa7beebde3a8e0e98d1.
2017-10-09 14:08:18 +01:00
Cosimo Lupo
5ae9ce60c6 [Travis] still fiddling with .travis.yml...
https://travis-ci.org/fonttools/fonttools/builds/285560888
2017-10-09 14:04:07 +01:00
Cosimo Lupo
eba71efeec [Travis] fix syntax error in .travis.yml 2017-10-09 13:54:40 +01:00
Cosimo Lupo
3693309c65 [Travis] temporarily let osx python3.6 build fail
until the issue with Travis/Homebrew is fixed

https://github.com/fonttools/fonttools/issues/1068
2017-10-09 13:47:19 +01:00
Jens Kutilek
f7c4995413 Set correct expected control value 2017-10-09 13:22:33 +02:00
Jens Kutilek
9209da1bc3 Add cvt table to test data 2017-10-09 13:18:59 +02:00
Jens Kutilek
eaeb366810 Remove debug prints 2017-10-09 13:16:58 +02:00
Jens Kutilek
5b39aa7af2 Implement building cvar tables 2017-10-09 13:08:55 +02:00
Jens Kutilek
f0d5db9975 Add cvt tables to test data 2017-10-06 11:47:20 +02:00
Cosimo Lupo
ae73c45e6a [hhea/vhea] cast to int when using math.ceil and floor
Fixes https://github.com/fonttools/fonttools/issues/1064
2017-10-05 13:27:13 +01:00