8754 Commits

Author SHA1 Message Date
Erik van Blokland
e348a06e82 Update README.md 2016-11-15 16:27:46 +01:00
Erik van Blokland
3e8175569d Update README.md 2016-11-15 14:29:14 +01:00
Erik van Blokland
1bd59c3ef6 Update README.md 2016-11-15 14:25:19 +01:00
Erik
41f5cd7e5d more things to ignore. 2016-11-15 13:47:48 +01:00
Erik
2fbdd37362 Initial commit
- independent reader / writer object for designspace documents.
- imports and exports easy to subclass objects for instance, source and axis data.
- roundtrips
- intended to be compatible with use in MutatorMath, Superpolatpor and varlib.
2016-11-15 13:27:39 +01:00
Behdad Esfahbod
78d3cbea57 [subset] Fix subsetting MathVariants
Was failing on Caudex-Regular.ttf for example.
2016-11-11 10:58:02 -08:00
James Godfrey-Kittle
c66ba36b50 Merge pull request #59 from anthrotype/print-incompatible-glyphs
[ufo] print name of incompatible glyphs
2016-11-10 10:22:30 -08:00
Behdad Esfahbod
25083502e4 [perimeterPen] Update check for cusps
If p1 coincides with p0 or p2, we still can use the lineTo()
code.
2016-11-08 16:39:38 -08:00
Behdad Esfahbod
7915a45ddf [varLib] Handle fonts without GPOS
Fixes https://github.com/fonttools/fonttools/issues/699
2016-11-08 15:44:39 -08:00
Behdad Esfahbod
a11bc5655d [merge] Ignore LangSys if None
Fixes https://github.com/fonttools/fonttools/issues/739
for now, though proper fix is more complicated.

This was hit now because the subsetter was changed a while back
to retain script systems even if empty...  I don't like that.
2016-11-08 14:06:50 -08:00
Behdad Esfahbod
4868a631b9 [Snippets/interpolatable] Improve error reporting
Also enable full vector.  It's necessary for accurate report.
2016-11-07 20:30:57 -08:00
Cosimo Lupo
86207144ae Merge pull request #736 from robmck-ms/master
[varLib] Do not emit null axes in fvar (default==min==max)
2016-11-05 12:51:46 +00:00
Rob McKaughan
1bebcec00d Do not emit null axes in fvar (default==min==max) 2016-11-04 14:53:43 -07:00
Cosimo Lupo
6618095c36
ufo: raise custom IncompatibleGlyphsError exception with the name(s) of incompatible glyphs
Fixes https://github.com/googlei18n/cu2qu/issues/46
2016-11-04 15:30:40 +00:00
Cosimo Lupo
9b4e755219
MANIFEST.in: also include tox.ini and .coveragerc 2016-11-04 09:17:49 +00:00
Cosimo Lupo
1ee9f58608
.coveragerc: add coverage.py configuration file 2016-11-04 09:17:26 +00:00
Cosimo Lupo
d1bbdbbc90
Bump version: 1.0 -> 1.1.0 2016-11-03 19:13:47 +00:00
Cosimo Lupo
9b57baad2f
travis: set up PyPI deployment on tags; upload test coverage to Coveralls.io 2016-11-03 19:13:23 +00:00
Cosimo Lupo
a3d004dbfe
tox.ini: add Tox configuration file, with py27, py35, coverage and coveralls environments 2016-11-03 19:09:45 +00:00
Cosimo Lupo
0f59ce3730
setup.py: set fonttools & ufoLib as install_requires, add package metadata, pytest-runner and wheel support 2016-11-03 19:08:13 +00:00
Cosimo Lupo
4e4f058b12
add setup.cfg with packaging and test configuration 2016-11-03 19:03:32 +00:00
Cosimo Lupo
ccbd964e59
convert README.md to reStructuredText so it can be used for both Github and PyPI 2016-11-03 19:02:31 +00:00
Cosimo Lupo
ad90b06ec9
update .gitignore 2016-11-03 19:01:13 +00:00
Cosimo Lupo
85bbe112ce
ufo_benchmark: move defcon and robofab imports inside respective setup functions
otherwise, pytest test collection fails to import ufo_benchmark mode, as defcon/robofab are not specified as install requirements, thus may not be present when running the test suite.
2016-11-03 18:59:00 +00:00
Cosimo Lupo
66d847e365
Update changelog for 3.2.1 2016-11-03 14:32:15 +00:00
Cosimo Lupo
6e0b952441
Bump version: 3.2.0 → 3.2.1 2016-11-03 14:21:51 +00:00
Cosimo Lupo
c66a2bc327
Bump version: 3.1.2 → 3.2.0
I had forgotten to bump the version for 3.2.0... Sorry :(

This is not a problem for the released packages, since versioneer correctly writes the tagged version.
It's only the hard-coded version string that's used as a fallback if git fails to compute the version which I forgot to update.
2016-11-03 14:21:51 +00:00
Cosimo Lupo
c653e1408c Merge pull request #734 from moyogo/revert-OS2
Fix "OS/2: fsSelection bits 0 and 5 should match head.macStyle bits 1 and 0"
2016-11-03 13:35:49 +00:00
moyogo
acfb137881 OS2/2: fix checking fsSelection bits matching head.macStyle bits 2016-11-03 11:37:00 +00:00
Cosimo Lupo
df967e70fc
varLib: rename --buildHVAR option to --build-HVAR; add 'build_HVAR=False' kwarg to 'build' function
better not having to pass an argparse.Namespace object to varLib.build
2016-11-03 10:59:00 +00:00
Rob McKaughan
bdbb8c5374 Add commandline switch to build HVAR 2016-11-02 20:54:50 -07:00
James Godfrey-Kittle
641a4cfc42 Merge pull request #56 from anthrotype/fix-py3-random-seed
Fix tests on py2 because of differences with py3 random module
2016-11-02 11:33:10 -07:00
Cosimo Lupo
11c640bf86
MANIFEST.in, setup.py: include test data in sdist, and install with the package 2016-11-02 18:13:08 +00:00
Cosimo Lupo
61dff00a17
travis: test on both py27 and py35; drop py34 as it's redundant
install deps from requirements.txt

no need to install cu2qu to run `setup.py test`.
2016-11-02 17:56:39 +00:00
Cosimo Lupo
f178972b5b
add requirements.txt file with fonttools and ufoLib dependencies 2016-11-02 17:54:10 +00:00
Cosimo Lupo
4fb661f01a
cu2qu.test: load test package data using pkg_resources
The test suite is installed as a sub-package, so the test data must also be installed along with it.

The `__file__` attribute can be missing when importing a zipped package, so we load test files with `pkg_resources.resource_filename()`.
2016-11-02 17:51:08 +00:00
Cosimo Lupo
5e8f036edd
cu2qu_test: don't use 'random' to gen test curves for py23 compat, load from json file
`random.randint`, which is used in `cu2qu.benchmark.generate_curve` function, yields
different results when run in Python 2.7 or 3, despite using the same `random.seed(1)`.

For this reason, the `test_results_unchanged` and `test_results_unchanged_multiple` tests
in `cu2qu_test` module fail when run under Python 2.

Backward compatibility was broken with Python 3.2 `random` module, as a side effect of
fixing a non-uniformity bug. For mor info see:

https://groups.google.com/forum/#!topic/comp.lang.python/KwALjKjF6Y4
http://bugs.python.org/issue9025

To work around this, I dumped the result of generate_curve (running from Python 3.5.2 on
OSX) to a json file, and use that to run the tests.

I also stripped the white space to reduce the file size.

```python
import random
import json
from cu2qu.benchmark import generate_curve

random.seed(1)
curves = [generate_curve() for i in range(1000)]

with open("Lib/cu2qu/test/data/curves.json", "w") as fp:
    fp.write(json.dumps(curves).replace(" ", ""))
```

fixup
2016-11-02 17:51:07 +00:00
Cosimo Lupo
49268c8ab8 Merge pull request #732 from anthrotype/backslash-glyphs
[feaLib] support backslash-escaped glyphs in FEA
2016-11-02 16:16:44 +00:00
Cosimo Lupo
3933a16dd1
Update changelog 2016-11-02 16:10:34 +00:00
Cosimo Lupo
3b1e0bdc47
[feaLib.builder_test] fix up tests for backslash-escaped glyph names 2016-11-02 16:01:35 +00:00
Cosimo Lupo
a0cc66bfc0
[feaLib.parser] strip initial backslash from glyph names
Fixes https://github.com/fonttools/fonttools/issues/457

Backslash-prefixed glyph name can be used in a Feature file to distinguish them from identically-named keywords.

From section "2.f.i. Glyph name" of Adobe's Feature File Specification:

> An initial backslash serves to differentiate a glyph name from an identical keyword in the feature file language. For example, a glyph named "table" must be specified in the feature file as: \table

Thus, when we parse a glyph name that begins with a backslash, we need to ignore the first character.

Note that makeotf rejects feature files with glyph names that start with or contain backslashes, even when escaped with another backslash.

feature liga {
    sub \\glyphWithBackslash by A;
} liga;

This yields:

    makeotfexe [FATAL] <Backslash-Regular> invalid token (text was "\") [features 2]
2016-11-02 16:01:21 +00:00
Cosimo Lupo
dcb72536a0
[C_F_F_test] strip ttFont's 'ttLibVersion' attribute because it may change 2016-11-02 10:05:10 +00:00
Cosimo Lupo
df73cc5b32
[travis] always do git fetch --unshallow to get tags for computing version
Otherwise some tests that checks for the version string may fail:
https://travis-ci.org/fonttools/fonttools/jobs/172478473#L1155
2016-11-02 09:33:19 +00:00
Cosimo Lupo
2611ec2cff
[travis] only make dist in before_deploy stage; use 'file_glob' to get files for Github Releases 2016-11-02 09:30:18 +00:00
Behdad Esfahbod
904b1c5942 Support splitting PairPosFormat1 tables
Fixes https://github.com/googlei18n/fontmake/issues/143
2016-11-01 18:15:21 -07:00
Adrien Tétar
16f0fd2259 Merge pull request #731 from fonttools/changelog-3.2.0
update changelog for 3.2.0
2016-11-01 21:43:45 +01:00
Cosimo Lupo
59f01c8dc3
NEWS: update changelog for 3.2.0 2016-11-01 19:16:10 +00:00
Behdad Esfahbod
b4ebe12b31 [varLib] Reenable HVAR for CFF2 fonts
https://github.com/fonttools/fonttools/issues/705
2016-10-31 16:15:24 -07:00
Behdad Esfahbod
c5c942293a [./fonttools] Add ./Lib to python path
See f5bf9b04de (commitcomment-19636642)
2016-10-31 11:55:15 -07:00
Behdad Esfahbod
f5bf9b04de Add a 'fonttools' command-line tool that simply runs modules
ttx is now equivalent to:
$ fonttools ttx

pyftsubset can be called as:
$ fonttools subset

varLib can be called as:
$ fonttools.varLib

Also adds a executable at toplevel called fonttools, such that
with "./fonttools ..." one can run stuff without installing.
Python seems to automatically include ./Lib into its search path.
2016-10-30 15:19:29 +02:00