2639 Commits

Author SHA1 Message Date
Cosimo Lupo
fe740dbb68 dev-requirements.txt: add virtualenv>=15.0 as Appveyor ships with an old one
virtualenv is required by tox. Appveyor ships with virtualenv 13.x or something.
tox works fine with that.

However, virtualenv install its own embedded version of pip in the newly created environments. When we install the requirements.txt, pip complains that pip is not up-to-date. Updating virtualenv makes pip stop complaining.

Woosh.
2016-04-10 19:17:36 +01:00
Cosimo Lupo
8bf3fd18c0 appveyor: add script to set SDK vars for 64-bit py34 before running tox
Update appveyor.yml to follow the most recent recommendation from PyPA Packaging User Guide:
http://python-packaging-user-guide.readthedocs.org/en/latest/appveyor/

- set DISTUTILS_USE_SDK=1 only for Python34-x64. It seems like we no longer need to do that for Python2.7-x64;
  For more info check this: https://github.com/ogrisel/python-appveyor-demo/issues/39

- run tox using 'with-compiler.cmd' batch script so that Brotli extension can be built from git source with the correct MSVC and Windows SDK versions (btw, I wish brotli was on PyPI already so we could just `pip install brotli` and done!);

- define TOXPYTHON variable to make sure tox uses the correct python interpreter. Previously, in fact, the 'py34' toxenv was always picking up the 32-bit interpreter, even when we were testing the 64-bit Python 3.4 :(...

- add PowerShell command to enable 'rollout builds' feature, as done on 'python-appveyor-demo':
f54ec3593b/appveyor.yml (L81-L89)

- call pip via `python -m pip` to make sure we are running the just updated pip version, instead of Appveyor's pre-installed pip

- Remove unused stuff
2016-04-10 19:17:36 +01:00
Behdad Esfahbod
c6facc99df When splitting a large class-kerning table, mark the old subtable as DontShare
Fixes https://github.com/behdad/fonttools/issues/537#issuecomment-196047070
2016-04-09 13:06:16 -07:00
Cosimo Lupo
17bb7891ad [Snippets/apply-feature-file.py] add -v option to increase logging verbosity 2016-04-09 18:13:42 +01:00
Cosimo Lupo
a210716a85 Merge pull request #566 from khaledhosny/fealib-hhea
[feaLib] Support hhea table
2016-04-09 17:41:22 +01:00
Khaled Hosny
5ceaa43d27 [feaLib] Support hhea table 2016-04-09 18:02:40 +02:00
Behdad Esfahbod
a61b31a917 [subset] Mark avar and fvar tables as no-need-subsetting 2016-04-08 18:41:31 -07:00
Cosimo Lupo
09d2983fbb [classifyTools] rename 'sorted' -> 'sort' to avoid confusions with the built-in name 2016-04-08 22:08:21 +01:00
Cosimo Lupo
0be1d722dc test on more recent pypy-5.0.0 (the latest one is 5.0.1 but is not yet available to install via pyenv) 2016-04-08 22:04:28 +01:00
Cosimo Lupo
020acf168b [classifyTools] fixup tests after reverting commit 34d43aa 2016-04-08 21:59:05 +01:00
Cosimo Lupo
20320494de Revert "[classifyTools] 'sorted' keyword argument should be boolean"
This reverts commit 34d43aa797c8b9e4ff42782bfdd7abde7711835d.

See 34d43aa797 (commitcomment-17012817)
2016-04-08 21:54:56 +01:00
Cosimo Lupo
1aa92de366 [classifyTools] must sub-class from 'object' to use new-style classes on py2 2016-04-07 12:09:28 +01:00
Cosimo Lupo
c9db89a851 [classifyTools] fix doctest failing on pypy
It seems like sets are hashed differently in CPython and PyPy.
Because of this, the returned list of class sets may have a different sort
order (within each class size) between the two implementations.

For now, I make the test pass on both CPython and PyPy by casting the returned
list of sets into a set of (frozen) sets, and asserting that its *content* is
correct, without considering the *order* of the sets in the list.
2016-04-07 11:54:53 +01:00
Cosimo Lupo
d2aab877bb [classifyTools] fix CI doctest failures on python 3
set objects have different __repr__ on python 2 and 3

Python 3:
    >>> {1, 2, 3}
    {1, 2, 3}

Python 2
    >>> {1, 2, 3}
    set([1, 2, 3])

(one among the several reasons I don't particularly like doctest...)
2016-04-07 10:00:49 +01:00
Cosimo Lupo
4ac53ab8b8 add missing 'import sys'
A couple of modules were relying on the fact that the 'sys' module was being implicitly imported by 'from py23 import *'.
The 'py23.__all__' does not include 'sys'. I think it's better to always import 'sys' explicitly when needed.
2016-04-07 09:42:13 +01:00
Cosimo Lupo
69bee48a8f [classifyTools] semicolon 2016-04-07 09:33:02 +01:00
Cosimo Lupo
34d43aa797 [classifyTools] 'sorted' keyword argument should be boolean
or at least that's what the signature and the docstring imply.
2016-04-07 09:31:12 +01:00
Cosimo Lupo
da04ab2909 [py23] define __all__ variable
specifying the list of names that are imported when `from py23 import *` is used
2016-04-07 09:21:05 +01:00
Behdad Esfahbod
6bfe6989de [Snippets/symfont] Add glyph perimeter to GlyphStatistics 2016-04-06 18:15:43 -07:00
Behdad Esfahbod
f70d264ef0 Add __bool__ to fontTools.misc.transform.Transform 2016-04-06 18:15:43 -07:00
Behdad Esfahbod
552b5d97fc Add fontTools.misc.classifyTools, helpers to classify things into classes
To be extended with more features / API.  API might change.
2016-04-06 18:15:43 -07:00
Behdad Esfahbod
2a0359af4d Always import * from py23
Since py23 modifies some essential builtins, it's safe to import
everything all the time.  At least, that's how it was designed.
It's a bug if importing * breaks some code.
2016-04-06 18:15:43 -07:00
Cosimo Lupo
e3f3f4f976 [_m_a_x_p] rename 'allXMaxIsLsb' variable to 'allXMinIsLsb' for clarity's sake
The previous 'allXMaxIsLsb' name was misleading.
The 'allXMinIsLsb' boolean variable cooresponds to the head table's Bit 1.
This is set whenever all glyphs have the bbox.xMin equal to the respective
left sidebearing (and therefore "left sidebearing point at x=0").
2016-04-05 16:17:38 +01:00
Sascha Brawer
13e862da72 [meta] Remove comments about intentionally deviating from Apple's spec
Today, Apple has kindly fixed a bug in the [specification of the
meta table](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6meta.html).  The existing fonttools implementation matches the
revised specification.  Therefore, the comments about fonttools
intentionally deviating from Apple's spec can be removed.
2016-04-01 15:50:52 +02:00
Sascha Brawer
919e98c3bb Merge pull request #563 from behdad/subset-gvar
Support subsetting of variation fonts
2016-04-01 09:02:49 +02:00
Sascha Brawer
0fad6e66ec Support subsetting of variation fonts 2016-03-31 16:23:24 +02:00
Cosimo Lupo
3c187c590a [ttx] minor: don't suppress SystemExit on win32 platform 2016-03-30 14:56:40 +01:00
Cosimo Lupo
d8004de04c [ttx] remove redundant continue in parseOptions loop
`git blame` says that was my fault:
e5b6be00a0 (diff-fce6b83de86f2e83411202adc745ffb2R316)

Ouch.
2016-03-28 18:07:59 +02:00
Cosimo Lupo
87a1d1bd8f Merge pull request #561 from mashabow/readme
Minor fixes in README.md
2016-03-28 15:28:33 +02:00
Masaya Nakamura
68ea04eced Minor fixes in README.md 2016-03-28 10:40:49 +09:00
Sascha Brawer
b62f525208 Merge pull request #557 from khaledhosny/fealib-os2
[feaLib] Support OS/2 table
2016-03-23 14:13:33 +01:00
Khaled Hosny
0a1f323835 [feaLib] Support OS/2 table 2016-03-23 15:42:00 +04:00
Khaled Hosny
fdcba0e130 [feaLib] Allow “/” in name tokens
For “OS/2” table.
2016-03-23 03:10:05 +04:00
Cosimo Lupo
7e553e9fee Merge pull request #556 from anthrotype/feaLib-file-input
[feaLib] take in a path or a file-like object
2016-03-22 13:36:24 +00:00
Cosimo Lupo
9e8113718b [feaLib.builder] decode features string using tounicode before passing it to StringIO (for python2) 2016-03-21 19:39:07 +00:00
Cosimo Lupo
bb937e35e6 [feaLib.parser_test] fix up tests after changes to featurefile arg 2016-03-21 18:55:38 +00:00
Cosimo Lupo
3affc725aa [feaLib.lexer_test] fix up tests after changes to make_lexer_ 2016-03-21 18:55:35 +00:00
Cosimo Lupo
0f8f71d5ec [feaLib.lexer] modify make_lexer_ factory to take a 'file_or_path' argument
if 'file_or_path' is a file object keep it open, otherwise read the data from
the path and then close it.
2016-03-21 18:53:25 +00:00
Cosimo Lupo
6a05367a2c [feaLib.parser] change argument name 2016-03-21 18:47:27 +00:00
Cosimo Lupo
06b9a808ad [feaLib.builder] make addOpenTypeFeatures take only one 'featurefile' argument; add addOpenTypeFeaturesFromString
'featurefile' can be either a path (string) or a file object, like in TTFont or XMLReader and XMLWriter constructors.

If a file object does not have a 'name' attribute, a default "<features>" name is
used and the current working directory is assumed as the root for relative includes.
2016-03-21 18:46:50 +00:00
Behdad Esfahbod
2e816d6c2d [symfont] Permissions 2016-03-21 10:12:26 -07:00
Behdad Esfahbod
40198a2dec [gvar] Use array.array to decode deltas 2016-03-21 10:12:26 -07:00
Behdad Esfahbod
9987b7e14e [gvar] Use array.array to decode deltas 2016-03-21 10:12:26 -07:00
Cosimo Lupo
83f074aac4 [feaLib] use shorter fea_path and fea_data kwargs in addOpenTypeFeatures
as discussed here: https://github.com/behdad/fonttools/pull/547/files#r56807232
2016-03-21 12:18:32 +00:00
Sascha Brawer
d268206fdd Merge pull request #555 from anthrotype/fealib-ignore-names-1-6
[fealib] ignore nameIDs 1-6 in parser and issue a warning
2016-03-21 12:14:56 +01:00
justvanrossum
ad386ee477 Keep Format attribute for OT subtables. This value may be ignored by the compiler but is useful for debugging. Part of fixing #92. 2016-03-21 12:12:05 +01:00
Cosimo Lupo
694b9d6917 [feaLib.parser_test] add test for ignored nameIDs 1-6 2016-03-21 11:02:03 +00:00
Cosimo Lupo
5efc85873b [feaLib.parser] issue a warning and ignore 1 <= nameID <= 6 (like makeotf) 2016-03-21 11:01:33 +00:00
Just van Rossum
a11c8d610f Merge pull request #554 from schriftgestalt/master
Disable optimisations when decompiling TrueType instructions
2016-03-21 07:47:52 +01:00
schriftgestalt
b09c5baa15 Disable optimisations when decompiling TrueType instructions 2016-03-20 22:26:22 +01:00