Cosimo Lupo
b2fac2333e
[varLib] allow loading masters from TTX files as well
...
in a designspace document, the sources' filename attribute can now contain
a relative path to a .TTX file for that master, in addition to .TTF or .UFO
(the latter, resolved through a master_finder callable as before).
2019-01-14 16:32:51 +00:00
Cosimo Lupo
8350332461
{v,h}mtx: allow to compile/decompile even without {v,h}hhea table
...
when no horizontal/vertical header table is present, we assume numberOfHMetrics == maxp.numGlyphs.
This allows to compile/decompile incomplete fonts, only containing head, maxp, hmtx, loca and glyf (or CFF),
that is the bare minimum to temporarily store glyph outline and metrics data for use with sparse/intermediate
master TTFs in varLib.
See https://github.com/googlei18n/ufo2ft/issues/308
2019-01-14 13:45:24 +00:00
Cosimo Lupo
fe19178ff0
Merge pull request #1438 from anthrotype/enable-varLib-labelNames
...
[varLib] use addMultilingualName method to support localized axis and instance names
2019-01-13 17:07:31 +00:00
Cosimo Lupo
57f6e310f3
varLib_test: test axes with non-english labelnames
2019-01-13 13:43:00 +00:00
Just van Rossum
6f7c0f1d09
[ttLib] cmap format 14 cleanup ( #1437 )
...
* cleanup cmap format 14 TTX format by removing redundant attributes
* don't output the name attr for a default mapping, instead of a glyph named 'None'
* still accept 'None' as an indicator glyph name, for bw compatibility
* swap order of TTX attrs uv and uvs
* make sure (unicode, glyphName) pairs are always tuples in uvsDict.
2019-01-10 19:19:35 +01:00
Just van Rossum
855378477f
[ttLib] adding a test for cmap format 14 (unicode variation sequences) ( #1436 )
...
Adding a test for cmap format 14 (unicode variation sequences), in preparation for #1435
2019-01-10 16:48:10 +01:00
justvanrossum
1a8cccc818
explicitly test glyphName = None
2019-01-09 16:14:22 +01:00
justvanrossum
863bdb60c8
allow dumping/verifying a custom subset of the tables
2019-01-09 15:02:48 +01:00
justvanrossum
391f7a76c0
added support for cmap format 14 Unicode Variation Sequences
2019-01-09 14:53:35 +01:00
Cosimo Lupo
eb6ee2cdd3
Merge pull request #1431 from fonttools/fontbuilder-no-mac-names
...
fontBuilder: add options to setupNameTable to disable Mac (or Win) names
2019-01-07 11:10:18 +00:00
Cosimo Lupo
44b1613cad
Merge pull request #1430 from rsms/cff-encode-float
...
Fixes bug in misc.psCharStrings.encodeFloat and adds test
2019-01-07 11:09:09 +00:00
Cosimo Lupo
c8cc5e718a
Revert "Merge pull request #1429 from rsms/misc-encodeFloat-test"
...
This reverts commit 3f1956949a55870a97c75a27dbe59b8d617d587e, reversing
changes made to dc4600856201650d199bf7e2eddc28ba6e7aa970.
2019-01-07 11:07:17 +00:00
Cosimo Lupo
3f1956949a
Merge pull request #1429 from rsms/misc-encodeFloat-test
...
Adds test for misc.psCharStrings.encodeFloat that exposes a bug
2019-01-07 11:00:49 +00:00
Cosimo Lupo
68e918d32b
fontBuilder: add options to setupNameTable to disable Mac (or Win) names
...
as of https://github.com/fonttools/fonttools/pull/1359 , both sets of names are added by
default. This allows users to optionally exclude Macintosh platform names (i.e. mac=False).
2019-01-07 10:46:48 +00:00
Cosimo Lupo
dc46008562
fontBuilder_test: Fix up expected test data for test_var.otf.ttx
...
after merging #1359
2019-01-07 10:36:34 +00:00
Cosimo Lupo
683547dde2
Merge pull request #1359 from justvanrossum/addmultilingualnames-mac
...
[name] make addMultilingualNames() add mac names by default
2019-01-07 09:54:34 +00:00
Rasmus Andersson
4c72b8f781
Change precision to 8 digits to match AFDKO
2019-01-05 11:06:59 -08:00
Rasmus Andersson
768f8ec171
Fixes bug in misc.psCharStrings.encodeFloat and adds test
2019-01-04 15:48:14 -08:00
Rasmus Andersson
86461d6281
Adds test for misc.psCharStrings.encodeFloat that exposes a bug with "E+"
2019-01-04 15:13:01 -08:00
Cosimo Lupo
448b946636
varLib/designspaceLib: require font-less source to have a path; remove getSourcePath
...
simpler is better. Also, refactored updatePaths and added more tests to it.
2019-01-03 14:21:09 +00:00
Cosimo Lupo
7d688ff18a
varLib_test: read TTFonts from compiled binary files
...
instead of importing from TTX, and set lazy=True so we exercise the special SFNTReader.__deepcopy__
2019-01-03 11:26:53 +00:00
Cosimo Lupo
b3e8f76b64
designspace_test: compare normalized paths
...
https://github.com/fonttools/fonttools/issues/1259#issuecomment-450910787
2019-01-02 16:33:03 +00:00
Cosimo Lupo
a0e4c04c1e
designspace_test: use tmpdir fixture and platform-independent path separator
2019-01-02 15:34:40 +00:00
Cosimo Lupo
3558d4e537
Merge remote-tracking branch 'origin/master' into varlib-build-accept-ds-object
2019-01-02 14:12:56 +00:00
Cosimo Lupo
88eacd3804
designspace_test: test getSourcePath method prefers 'path' attribute when present
2019-01-02 14:10:22 +00:00
Cosimo Lupo
1470ef7258
designspaceLib: add getSourcePath method
...
and remove BaseDocReader.getSourcePaths as it was broken anyway (it was assuming 'sources'
attribute of DesignSpaceDocument object was a dict, whereas it is now a list of
SourceDescriptor objects
2019-01-02 14:06:55 +00:00
Cosimo Lupo
5b250db6cb
varLib_test: test loading master with layerName but without required font object
2019-01-02 13:39:39 +00:00
Cosimo Lupo
ba197cb84c
varLib_test: no need to reload master_ttfs; reuse the reload_font helper func in the other tests
2019-01-02 12:52:57 +00:00
Just van Rossum
327b05d8c0
[designspaceLib] [t1Lib] [misc.macRes] fix some cases where pathlib.Path objects were not accepted ( #1421 )
...
* fix two cases where pathlib.Path objects were not accepted
* make macRes reader accept os.PathLike objects
* use __fspath__ explicitly to support os.PathLike paths
* use __fspath__ explicitly to support os.PathLike paths
* convert tmpdir to str
* only test pathlib.Path on Python 3.6 and up
2018-12-30 12:07:05 +01:00
Nikolaus Waxweiler
e464e450ac
Make build and load_designspace accept a DS object
2018-12-19 13:40:11 +00:00
Denis Moyogo Jacquerye
f998688c00
Merge pull request #1413 from moyogo/STAT-1.1
...
Pin STAT to version 1.1
2018-12-17 20:30:32 +00:00
Behdad Esfahbod
9c3dde3ce6
[varLib] Always write tuple entries for composite glyphs ( #1383 )
...
* [varLib] Always write tuple entries for composite glyphs
Fixes https://github.com/fonttools/fonttools/issues/1381
Fixes https://github.com/googlei18n/fontmake/issues/481 partially
* Make sure at least one gvar delta is written for composites
* Add test data for composite fix
* Put in the correct issue link
* Typo
* Fix typos
* Expand comment, add link to issue
* Add ttx files for test font
2018-12-17 14:03:40 +01:00
Denis Moyogo Jacquerye
c48a7b94c1
[varLib] downgrade STAT to version=0x00010001 in tests
2018-12-17 10:31:35 +00:00
Nikolaus Waxweiler
3b2bfcf29a
Treat Mapping objects as dicts
2018-12-13 15:44:25 +00:00
Just van Rossum
a3817fd971
Merge pull request #1399 from justvanrossum/fontbuilder-cff2
...
[fontBuilder] some support for CFF2; inferring FontMatrix from unitsPerEm for CFF
2018-12-06 09:23:45 +01:00
justvanrossum
8812f9072b
tests for #1400
2018-12-05 19:54:14 +01:00
justvanrossum
82c4f410fb
remove empty fdArrayList argument, will be filled in
2018-12-05 15:09:27 +01:00
justvanrossum
874c08dcd2
CFF: set FontMatrix based on unitsPerEm automatically, unless manually overridden
2018-12-05 15:07:20 +01:00
justvanrossum
de1dbe5f16
some more test refactoring
2018-12-05 14:03:15 +01:00
justvanrossum
c663e7f299
refactor output verifying
2018-12-05 13:57:07 +01:00
justvanrossum
9d73327f3b
Some support for CFF2
2018-12-05 13:51:42 +01:00
ReadRoberts
63c94beb20
Merge commit '889d683064cea426ac692431ee599752519cea18' into varlib-build-cff2vf
...
# Conflicts:
# Lib/fontTools/misc/psCharStrings.py
2018-11-30 09:21:18 -08:00
Behdad Esfahbod
361e1e6aa0
Merge pull request #1377 from fonttools/varlib-interpolate-cff2
...
Varlib interpolate cff2
2018-11-30 00:21:13 -05:00
ReadRoberts
ad8130e1a4
[varlib] Remove path compatiblization logic from CFF2CharStringMergePen
...
Agreed that paths glyphs form source fonts shoudl be fully compatible before varLib.build is called.
Updated test files
2018-11-29 15:07:08 -08:00
ReadRoberts
c2abd045b3
[varLib.mutator] Add interpolation of glyph metrics.
...
Added interpolation of glyph advance width, from HVAR/hmtx, and derivation of new LSB.
Updated tests to match.
Needed to cherrypick from another branch an update for psCharstrings to allow the CFFSubr.draw() method to work.
2018-11-20 12:44:21 -08:00
Denis Moyogo Jacquerye
0c4f11f5ff
Merge pull request #1361 from moyogo/kerntable
...
Ignore the length of kern table sutable format 0
2018-11-20 13:41:13 +00:00
Denis Moyogo Jacquerye
7e3164e8da
kern table: add tests for overflowing subtable
2018-11-20 12:41:57 +00:00
ReadRoberts
bde62cd653
[varLib.mutator] Move test for interpolating CFF2 tables
...
from varLib_test.py to mutator_test.py
2018-11-19 20:08:10 -08:00
ReadRoberts
617b8c6396
[varLib.mutator] Interpolating CFF2 tables. Make more fixes per recommendations
...
varStore.py. Commit the correct function references.
psCharstrings.py. Add decompiler class specifically for flattening subroutinized charstrings.
mutator.py. Flatten the subroutinized charstrings, delete the Subrs.
TestCFF2VF.otf, Updated to version with subroutinization. Updated expected ttx output.
2018-11-19 20:08:00 -08:00
ReadRoberts
fddd5b2bae
[varLib.mutator] Interpolating CFF2 tables. Makes fixes per recommendations
...
varLib.py. restore import of 'fontTools.misc.py23 import *'
varStore.py. Rename 'applyScalar' to 'interpolateFromDeltasAndScalars', and refactor common code with __git__item to a static method.
mutator.py. Update to reflect function name change to interpolateFromDeltasAndScalars. Changed some logic from one line to several lines for readability, and i to avoid flake8 warnings about line too long.
2018-11-19 20:06:16 -08:00