3250 Commits

Author SHA1 Message Date
Cosimo Lupo
3acacb592d fontTools: use versioneer to get_versions(); if fails, print warning and fall back to latest known tag 2016-10-12 00:49:57 +01:00
Cosimo Lupo
6df7feb70d add back the MANIFEST.in for all the extra files in sdist
We need this as we no longer use setuptools_scm to retrieve the full list of files under version control.
Instead, we need to spell them out one by one.
Hopefully we don't forget anyone...
2016-10-12 00:49:54 +01:00
Cosimo Lupo
36cc2ed249 add .gitattributes file for versioning git archives (e.g. Github's 'download zip') 2016-10-12 00:40:12 +01:00
Cosimo Lupo
8bc5c6123c .gitignore: remove setuptools_scm 'version.py' 2016-10-12 00:40:06 +01:00
Cosimo Lupo
47cdb2a501 setup.py: use versioneer instead of setuptools_scm 2016-10-12 00:40:06 +01:00
Cosimo Lupo
48b566dc09 check-in auto-generated versioneer.py and _version.py files 2016-10-11 19:01:34 +01:00
James Godfrey-Kittle
5606f47c03 Merge pull request #691 from jamesgk/varlib-usability
varLib usability stuff
2016-10-10 15:20:03 -07:00
Cosimo Lupo
c4c102950d Merge pull request #698 from anthrotype/write-to-version-py
Write version.py file with static string
2016-10-10 16:02:55 +01:00
Cosimo Lupo
b1fae3fe32 ttx/ttLib: use from fontTools import version as before 2016-10-10 15:26:04 +01:00
Cosimo Lupo
7223536d7d fontTools.__init__: restore fontTools.version for backward compatiblity
See https://github.com/fonttools/fonttools/issues/697#issuecomment-252622588
2016-10-10 15:20:07 +01:00
Cosimo Lupo
10b30b954a .gitignore: add Lib/fontTools/version.py
We no longer need to check this file in the repository, as it is generated upon installtion from the git metadata by setuptools_scm
2016-10-10 15:11:55 +01:00
Cosimo Lupo
6b152f57ae generate 'version.py' file with plain version string instead of using pkg_resources to read version from package metadata
See https://github.com/fonttools/fonttools/issues/697#issuecomment-252621005
2016-10-10 15:06:11 +01:00
Cosimo Lupo
718201471a {subset,builder}_test: fix order of fromfile/tofile in expect_ttx
The order of the arguments for difflib.unified_diff was inverted in feaLib.builder_test.
The same snippet was probably copy-pasted to the subset_test.

See https://docs.python.org/3/library/difflib.html#difflib.unified_diff
2016-10-09 11:54:48 +01:00
Cosimo Lupo
5d43936d85 subset_test: add basic unit tests for --no-hinting (CFF and TTF) and --desubroutinize options (CFF only) 2016-10-09 11:37:52 +01:00
Cosimo Lupo
942e656b3c subset_test: remove unused variable 2016-10-09 11:22:21 +01:00
Cosimo Lupo
ddfa48ea7c subset: 'draw' charstrings to set 'width' before calling 'drop_hints'
the horizontal advance of hinted charstrings gets lost when the CFF hinting
is stripped with '--no-hinting' option, as noted by @miguelsousa here:

https://github.com/behdad/fonttools/issues/343#issuecomment-156234918

The reason is T2CharString objects only get assigned a 'witdh' attribute
after their 'draw' method is called.

The subsetter's 'drop_hints' function attempts to insert the width back
at the beginning of the de-hinted charstring's program, but can do that
only if the charstring does have a 'width' attribute:

https://github.com/behdad/fonttools/blob/master/Lib/fontTools/subset/__init__.py#L1908
2016-10-09 10:59:10 +01:00
Cosimo Lupo
c719da5bca [sstruct/xmlWriter]: issue a deprecation warning when the two top-level modules are imported
Part of #696

(These are a actually `UserWarning` instead of `DeprecationWarning`, as the latter are normally muted)
2016-10-08 17:21:36 +01:00
Cosimo Lupo
8a7b245069 Merge pull request #695 from htgoebel/patch-1
Remove extra_path distribution kwarg
2016-10-08 14:33:58 +01:00
Hartmut Goebel
f8982ac952 Remove extra_path distribution kwarg
This is of no use, it is undocumented and bound to be removed.

See https://bugs.python.org/issue901727 and https://bugs.python.org/issue27919.
2016-10-08 15:10:02 +02:00
James Godfrey-Kittle
1e8e17e753 [varLib] Define an interpolate_layout method 2016-10-06 17:33:07 -07:00
James Godfrey-Kittle
6f6106ef6c [varLib] Rename interpolate-layout to be loadable 2016-10-06 17:32:37 -07:00
Behdad Esfahbod
b5d7eb8fd4 [varLib] Show failure path when merging fails 2016-10-05 17:03:48 -07:00
Cosimo Lupo
53dce87b03 Merge pull request #688 from fonttools/fix-varlib-names
Fix varlib names
2016-10-05 19:23:10 +01:00
James Godfrey-Kittle
0682e77370 Merge pull request #690 from jamesgk/area-pen
Allow single-point open contours in area pen
2016-10-04 18:05:43 -07:00
Behdad Esfahbod
87e07bc4c4 [varLib] Add kerning merger for interpolate-layout.py 2016-10-04 17:46:22 -07:00
James Godfrey-Kittle
c732ffce8e [areaPen] Add test for endPath 2016-10-04 17:33:16 -07:00
James Godfrey-Kittle
238e8cbc52 Typo 2016-10-04 17:32:49 -07:00
James Godfrey-Kittle
870b7ce92a Allow single-point open contours in area pen
Sometimes an anchor is drawn as a moveTo followed by an endPath, for
that case it makes sense just to ignore and count the area as zero.
2016-10-04 16:27:09 -07:00
Cosimo Lupo
79d755a837 [varLib] use both Macintosh and Windows names for fvar names; use addName method from _n_a_m_e.NameRecord; use unicode_literals
We must coerce name strings with `tounicode` because, on Python 2, the ElementTree library that we use to parse the designspace's XML will return ASCII-encoded `bytes` (PY2 `str`) whenever it can; and only returns `unicode` (PY3 `str`) when strings can't be encoded as ASCII... :(
However the `addName` method requires unicode strings (it wouldn't be able to encode them with multiple platform-specific encodings otherwise).
So we decode bytes as ASCII before passing them to addName.
2016-10-04 17:08:29 +01:00
Cosimo Lupo
726bf65160 [_n_a_m_e_test] add tests for addName method; test that warning is logged from setName if input is bytes 2016-10-04 17:08:29 +01:00
Cosimo Lupo
3feddad5c6 [name] add addName (from varLib); in setName, issue warning if string is not unicode; add makeName (from _n_a_m_e_test)
previously (only on Python 2), the following line was silently coercing to Unicode using default 'ascii' encoding, whenever the input string was a `bytes` string (same as `str` in PY2):

    namerecord.string = string.encode(namerecord.getEncoding())

On Python 3, the line above would crash, since bytes objects don't have an `encode` method (and rightly so).

`setName` should now accept both Unicode or bytes, but will issue a warning if the latter are used.
2016-10-04 17:04:35 +01:00
Cosimo Lupo
ab395ff0e2 move CapturingLogHandler class from subset to loggingTools module 2016-10-04 14:31:30 +01:00
Cosimo Lupo
74348a95e2 Merge pull request #687 from fonttools/woff-zlib-level
sfnt.py: drop `WOFFDirectoryEntry.zlibCompressionLevel`
2016-10-02 13:06:29 +01:00
Cosimo Lupo
2bbc62d371 sfnt.py: drop WOFFDirectoryEntry.zlibCompressionLevel; use global ZLIB_COMPRESSION_LEVEL instead
Fixes https://github.com/fonttools/fonttools/issues/686
2016-10-02 12:42:54 +01:00
Cosimo Lupo
1eba7b383c Merge pull request #681 from moyogo/feaLib_hex_version
feaLib: fix code to use hex version instead of float
2016-09-29 21:31:43 +01:00
moyogo
62894667f6 feaLib: fix code to use hex version instead of float 2016-09-29 20:43:50 +01:00
Cosimo Lupo
a533a3be44 .gitignore: add .eggs/ folder, used by setuptools to download test adn setup requirements 2016-09-28 19:26:11 +01:00
Cosimo Lupo
7a267f3339 Merge pull request #679 from fonttools/opentype-gx
Try fixing up Windows bot failure
2016-09-28 19:22:26 +01:00
Cosimo Lupo
95c1a3e2f7 C_F_F_test.py: load test CFF xml/binary data from external files 2016-09-28 18:13:11 +01:00
Cosimo Lupo
e0a10698aa [ttLib] must cast 'sfntVersion' to native string type (bytes on py2, str on py3) to normalize repr() output 2016-09-28 18:08:08 +01:00
Cosimo Lupo
674ceac0ce ttLib/tables/testdata: add C_F_F_.bin and C_F_F_.ttx for CFF table rountrip tests 2016-09-28 17:59:23 +01:00
Behdad Esfahbod
f9672ba7e1 Try fixing up Windows bot failure 2016-09-28 15:16:25 +02:00
Behdad Esfahbod
7740a5fe74 Merge pull request #677 from fonttools/opentype-gx
Merge Opentype Variation Fonts (previously known as OpenType GX)
2016-09-28 13:18:50 +01:00
Cosimo Lupo
4fbb8fe757 Merge pull request #678 from moyogo/fonttools-dev
appveyor, travis: use fonttools-dev@googlegroups.com
2016-09-27 21:34:22 +01:00
moyogo
27a99b8d56 README: fix up name 2016-09-27 21:10:05 +01:00
moyogo
331c97e42a README: mention fonttools-dev 2016-09-27 21:09:47 +01:00
moyogo
fbbc344556 appveyor, travis: use fonttools-dev@googlegroups.com 2016-09-27 20:52:09 +01:00
Cosimo Lupo
969b68ec2b [setup.py] fix url so PyPI shows the new project homepage 2016-09-27 19:34:43 +01:00
Behdad Esfahbod
3ec06df194 Fix failing tests 2016-09-27 19:53:58 +02:00
ReadRoberts
5b479716bc Fix bugs in cffLib.py. 1) In the last commit, I added logic to use a CFF predefined charset when possible. This is not allowed In CID fonts. Added a test to NOT do this when font is CD. 2) Added exception handler when reading FontDict XML to skip unknown fields. In previous versions, all the default key/value pairs for the TopDict were (incorrectly) written to FDArray FontDicts. New logic does not do that, but also should not fail when it sees any of these key/value pairs. 3) Changed the expected txt files for some of the subset tests. For the CID example, this meant removing the unnecessary key/value pairs from the FDArray FontDicts. For all, it meant adding the major.minor CFF version fields. 2016-09-27 19:49:41 +02:00