ReadRoberts
6cb84deccf
varLib. Add support for building CFF2 variable font with a call to varLib.build().
...
Fix bug in psCharStrings, to allow the CFF2Subr calls draw function to work
2018-11-20 12:20:46 -08:00
ReadRoberts
92b5e0faaa
[varLib.mutator] Fix changes lost during cherry-picking.
2018-11-19 20:35:34 -08:00
ReadRoberts
272244a822
[varLib.mutator] Merge with master head.
2018-11-19 20:12:45 -08:00
ReadRoberts
d2d31e57c8
[varLib.mutator] Move CFFs interpolation functions
...
from subset.__init.py and mutator.py into subset.cffLib.py
2018-11-19 20:10:46 -08:00
ReadRoberts
cf38e84f85
[varLib.mutator] Move test for interpolating CFF2 tables
...
from varLib_test.py to mutator_test.py
2018-11-19 20:09:11 -08: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
ReadRoberts
b5f12785e1
[varLib.mutator] Add test case for interpolating CFF2 tables
2018-11-19 20:06:10 -08:00
ReadRoberts
d43ebd5e49
[varLib.mutator] Add support for interpolating CFF2 tables
...
Add handling of CFF2 table to mutator.py
Add public method applyScalars() to varStore.py::VarStoreInstancer()
2018-11-19 20:06:03 -08:00
Behdad Esfahbod
335c98512e
[varLib] Variate GDEF LigCarets
...
Untested.
2018-11-19 16:46:22 -05:00
Behdad Esfahbod
a766d8d91e
[varLib.mutator] Mutate GDEF itself
2018-11-19 16:45:30 -05:00
Behdad Esfahbod
0218e07f76
[varLib.mutator] Move some code out of merger
2018-11-19 16:38:27 -05:00
Behdad Esfahbod
02f3512fb1
[varLib.varStore] Minor
2018-11-19 16:15:45 -05:00
Behdad Esfahbod
252059b6b8
[varLib.varStore] Simplify
2018-11-19 15:49:14 -05:00
Cosimo Lupo
bbd742dc10
Merge pull request #1376 from fonttools/pyup-scheduled-update-2018-11-12
...
Scheduled weekly dependency update for week 45
2018-11-19 11:12:23 +00:00
Cosimo Lupo
15e8df218a
Merge pull request #1384 from nyshadhr9/idef
...
Add IDEF for GETVARIATION opcode
2018-11-19 10:33:21 +00:00
Behdad Esfahbod
38663559b0
[varLib.mutator] Fix Anchor instantiation after recent change
...
Fixes https://github.com/fonttools/fonttools/issues/1380
2018-11-18 20:39:13 -05:00
Behdad Esfahbod
d4da819ce6
Space
2018-11-18 20:28:25 -05:00
Nyshadh Reddy Rachamallu
69c3f2c001
Fix unwanted white space changes
2018-11-16 18:11:25 -05:00
Cosimo Lupo
f99afc70d3
Merge pull request #1326 from BoboTiG/fix-resource-leak
...
Fix several ResourceWarning: unclosed file and some related improvement
2018-11-16 23:00:24 +00:00
Nyshadh Reddy Rachamallu
3512c8b77f
Avoid has_key; move break statement
2018-11-16 17:49:17 -05:00
Nyshadh Reddy Rachamallu
be793c80b9
stack data should follow same order as fvar; fix maxStackElements calculation
2018-11-16 15:33:33 -05:00
Nyshadh Reddy Rachamallu
e756d3eb52
Restructure code
2018-11-16 14:12:26 -05:00
Nyshadh Reddy Rachamallu
dbfba397e0
maxp attributes maxInstructionDefs and maxStackElements should be modified when idef is added
2018-11-16 13:01:38 -05:00
Behdad Esfahbod
e30b830403
Merge pull request #1368 from fonttools/varLib-sparse-masters
...
[varLib] Support sparse masters
2018-11-15 15:00:00 -08:00
Behdad Esfahbod
f530e3e398
Merge pull request #1372 from fonttools/varLib-faster-featureVars
...
[varLib] Far faster featureVars
2018-11-15 14:59:48 -08:00
Nyshadh Reddy Rachamallu
512bccf49e
Add IDEF for GETVARIATION opcode
2018-11-15 15:18:03 -05:00
Cosimo Lupo
87894641c0
pytest 4.0 doesn't recognize module name if listed in 'testpaths'
...
'fontTools' is not a folder name, but the import name of the package
where we have some doctests to be discovered and run.
even though we have --pyargs option (which makes pytest first attempt
to treat any positional arguments as module import names), with the
latest pytest 4.0.0 our tests started to fail as if the new pytest
is evaluating the default 'testpaths' (as defined in setup.cfg, used
when no arguments are supplied to pytest) _before_ the --pyargs
option, and thus it thinks that 'fontTools' is a directory name
instead of a package name...
This a workaround. It also means that if one runs `pytest` without
arguments, only the tests inside `Tests` directory are going to be
run automatically, and not also the doctests inside fontTools package.
When running the test suite using tox, all tests are run, both
those in Tests folder and the doctests in fontTools.
2018-11-15 08:47:20 +00:00
Behdad Esfahbod
0ab515b39e
[subset] If charString dehinted to empty, add "endchar"
...
Fixes https://github.com/fonttools/fonttools/issues/1379
2018-11-15 01:30:26 -05:00
Behdad Esfahbod
5856740486
Improve error message
2018-11-15 01:26:57 -05:00
Behdad Esfahbod
49772b136f
[varLib] Comment
2018-11-14 10:07:51 -05:00
Behdad Esfahbod
8d441779e5
[varLib] Fix PairPosFormat2 merging
...
See comments.
Fixes https://github.com/googlei18n/fontmake/issues/470
2018-11-13 22:30:42 -05:00
pyup-bot
7c65ffa0e9
Update fs from 2.1.1 to 2.1.2
2018-11-12 15:06:09 +00:00
Behdad Esfahbod
d067cb7df7
Revert "[varLib] Skip empty glyphs"
...
This reverts commit 446ee2a4d011909eaa14fa5ccbd8c4d6df3329de.
https://github.com/fonttools/fonttools/pull/1368#issuecomment-437689015
2018-11-12 09:53:28 -05:00
Behdad Esfahbod
16aa66c384
[varLib.featureVars] Update test expectation
2018-11-10 15:24:11 -05:00
Behdad Esfahbod
2295e27dca
[varLib.featureVars] Remove unused intersectBoxes()
2018-11-10 15:19:10 -05:00
Behdad Esfahbod
f1a9c6c036
Move popCount() into new fontTools.misc.intTools
2018-11-10 15:16:52 -05:00
Behdad Esfahbod
7111b253b1
Move hashdict into new fontTools.misc.dictTools
2018-11-10 15:14:36 -05:00
Behdad Esfahbod
0adc304c7b
[varLib.featureVars] Add TODO for moving things to fontTools.misc
2018-11-10 15:09:35 -05:00
justvanrossum
29cc726363
fix test expected data
2018-11-10 15:07:18 -05:00
justvanrossum
49b7333cf5
According to the spec, this number should be 0x00010000.
2018-11-10 15:07:18 -05:00
Behdad Esfahbod
5c1ca73123
[varLib] Rename allSame() to allEqual()
...
Being same ("is") is not the same as being equal ("=="), even though
the two are equal most of the time.
2018-11-10 15:06:07 -05:00
Behdad Esfahbod
e85a9755ef
[varLib.featureVars] Merge same-subsitutions rules as well
2018-11-09 23:59:33 -05:00
Behdad Esfahbod
f6bfc4139d
[varLib.featureVars] Add quadratic test
...
We get the optimal solution.
2018-11-09 18:59:28 -05:00
Behdad Esfahbod
34241a819b
[varLib.featureVars] Drop fully-occluded remainder boxes
...
Re-land the correct version.
2018-11-09 16:13:21 -05:00
Behdad Esfahbod
95e13008e1
Revert "[varLib.featureVars] Drop fully-occluded remainder boxes"
...
This reverts commit edecdce0a576b2e15e21711bcc73ae9beba0c527.
Was wrong. Will figure out the correct version.
2018-11-09 16:08:01 -05:00
Behdad Esfahbod
8005d43146
[varLib.featureVars] Enable test now that it passes
2018-11-09 16:04:21 -05:00
Behdad Esfahbod
edecdce0a5
[varLib.featureVars] Drop fully-occluded remainder boxes
2018-11-09 15:52:18 -05:00
Behdad Esfahbod
7d5fbe1605
[varLib.featureVars] Improve new algorithm to its full potential
...
See 0283b1f.
By finishing overlayBox() to cull remainder box when possible, we generate
far fewer spurious boxes, if any.
For the featureVars_test.py test case, this now generates optimal output,
that is, 2*n - 1 boxes.
Running time for n=20 stays at 0.06s, which is probably Python startup
time.
Running time for n=100 is down from 2.5s with unoptimized new algorithm,
to 0.17s for this and number of output boxes from 5050 to the optimal 199.
Fixes #1372 again
2018-11-09 15:35:58 -05:00