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
Behdad Esfahbod
f2b26304ff
[varLib.featureVars] Py3
2018-11-09 14:54:13 -05:00
Behdad Esfahbod
0be1636176
[varLib.featureVars] Optimize popCount()
...
While might look like unjustified micro-optimizing, for featureVars_test.py with
n=100, speeds up 10%. From 2.5s to 2.2s.
2018-11-09 14:34:15 -05:00
Behdad Esfahbod
0283b1fd1d
[varLib.featureVars] Rewrite algorithm
...
Whereas previous algorithm had exponential running time and return
value size, new one has quadratic.
For featureVars_test.py test case, for example, which is a pathological
test case of n sliding intervals, the number of output intervals of
various algorithms are:
- Previous algorithm: 2**n - 1
- New algorithm: n*(n-1)/2
- Optimal algorithm: 2*n - 1
Ie, we go from exponential to quadratic, whereas in this case the optimal
solution is linear.
Running time of said test, for n=20, goes from over 20s, to 0.06s.
The algorithm can be improved. The overlayBox() function currently does
not try to shrink the remainder box. Doing that will probably bring us
to optimal solution for this test case.
Fixes https://github.com/fonttools/fonttools/pull/1372
One test is failing. Needs to be investigated that new output is correct,
and test expectations updated.
2018-11-09 14:30:46 -05:00
Behdad Esfahbod
de2179caee
[varLib.featureVars] Update comment to match actual function output format
2018-11-09 12:15:37 -05:00
Behdad Esfahbod
c7e5a35515
[varLib.featureVars] Space
2018-11-09 12:11:48 -05:00
Behdad Esfahbod
5a34805d05
[varLib.featureVars] Improve test
2018-11-09 11:55:11 -05:00
Behdad Esfahbod
133607f4b1
[varLib.featureVars] Add test
2018-11-09 11:47:49 -05:00
Behdad Esfahbod
60db91646c
[varLib.featureVars] Add overlayFeatureVariations()
2018-11-09 11:17:17 -05:00
Behdad Esfahbod
a37dab4b74
[varLib.featureVars] Return exploded space from main entry point
...
Also, make font optional
2018-11-09 10:56:47 -05:00
Behdad Esfahbod
5560b26a5d
[varLib] Avoid combinatorial explosion in featureVars
...
By merging duplicate regions.
Fixes https://github.com/fonttools/fonttools/issues/1370
2018-11-09 10:39:19 -05:00
Cosimo Lupo
b51fc5ab72
Merge pull request #1366 from justvanrossum/fix-1365
...
[varLib] Fixing #1365 : AttributeError in addFeatureVariations()
2018-11-08 09:55:54 +00:00
justvanrossum
e45117aa02
Fixed bug that tried to get an attr off a LangSysRecord rather than a LangSys. Fixes #1365
2018-11-08 10:04:25 +01:00
Cosimo Lupo
0331f668c0
Merge pull request #1358 from silnrsi/fixpy3
...
Fix python3 file writing issues and table compression
2018-11-06 11:44:47 +00:00
Martin Hosken
2cfc16a172
Remove redundant bug fix, add graphite dependencies
2018-11-06 15:21:32 +07:00
Behdad Esfahbod
76c85e3c3b
[subset] Fix --no-hinting --desubroutinize
...
Fixes https://github.com/fonttools/fonttools/issues/1360
2018-11-02 17:52:15 -04:00
justvanrossum
cc540c41e9
oops, removed leftover debug turd
2018-11-02 11:59:07 +01:00
Just van Rossum
2ed480b50b
Merge pull request #1357 from justvanrossum/fontbuilder-improvements
...
FontBuilder improvements
2018-11-02 11:48:25 +01:00
justvanrossum
0bfee639c6
test named instances
2018-11-02 08:02:56 +01:00
Martin Hosken
9739247a81
Fix python3 file writing issues and table compression
2018-11-02 11:21:58 +07:00
justvanrossum
8298169dfb
at least set these ascent/descent values in the example
2018-11-01 21:33:56 +01:00
justvanrossum
6e299a1bd5
set reasonable values for ascent and descent, test toy variation font
2018-11-01 21:33:08 +01:00
justvanrossum
beaf0432a9
added many docstrings, and added setupHorizontalMetrics and setupVerticalMetrics methods to replace setupMetrics
2018-11-01 20:30:21 +01:00
Cosimo Lupo
364a578c1d
.travis/run.sh: TOXENV variable may list multiple tox envs
2018-11-01 13:36:13 +00:00
Cosimo Lupo
7059296312
tox: 'twine check' already checks RST, don't need to do it again
2018-11-01 13:23:27 +00:00
Cosimo Lupo
532abbcaf6
travis: automatically check REAMDE+NEWS are valid reStructuredText
2018-11-01 13:22:04 +00:00
Cosimo Lupo
e0303ae412
README: fix rst syntax error...
2018-11-01 13:21:24 +00:00
Cosimo Lupo
39dd56f552
tox: add env to check package long_description using 'twine check' command
...
Restrucutred Text is very picky. 3.32.0 release process failed because of some broken rst.
I have to stop doing [skip ci] when I update the changelog... :(
2018-11-01 13:11:12 +00:00
Cosimo Lupo
3ac256012a
Bump version: 3.32.0 → 3.32.1.dev0
2018-11-01 12:58:53 +00:00
Cosimo Lupo
aa7d99080a
Release 3.32.0
2018-11-01 12:58:52 +00:00
Cosimo Lupo
e4e0375b4c
Update changelog [skip ci]
2018-11-01 12:57:37 +00:00
Just van Rossum
d0fd4b899c
Merge pull request #1354 from justvanrossum/fontbuilder
...
Merging FontBuilder class.
2018-11-01 13:50:00 +01:00
justvanrossum
25f29841b7
rename setupDSIG to setupDummyDSIG and added a doc string to clarify the legacy status of this
2018-11-01 13:19:27 +01:00
justvanrossum
8d2615e9c8
document the required setup method call order
2018-11-01 12:37:37 +01:00
justvanrossum
723afd626d
mark module as experimental
2018-11-01 12:32:17 +01:00
justvanrossum
3e051f582e
added a note about the order of setup method calls
2018-11-01 12:21:38 +01:00
justvanrossum
d10dc87527
test DSIG
2018-11-01 12:13:47 +01:00
justvanrossum
7a084bd016
added assert message, fixed DSIG issue
2018-11-01 12:13:35 +01:00
justvanrossum
a81bcbf8a2
remove redundant method call
2018-11-01 12:08:20 +01:00
justvanrossum
277c7da951
added __all__ module attr
2018-11-01 10:28:05 +01:00
justvanrossum
a259d31109
added module doc string with two examples
2018-11-01 10:19:51 +01:00
justvanrossum
cabce338c7
calculate glyph bounds implicitly (unless asked not to do that)
2018-11-01 10:17:07 +01:00
justvanrossum
cfd00ef3dd
don't need to specify keepGlyphNames, esp. if it matches defsult behavior
2018-11-01 09:57:35 +01:00
justvanrossum
19eac2e00a
test localized name table entries
2018-11-01 09:55:27 +01:00
justvanrossum
a442ce627d
work towards making name strings localizable
2018-11-01 09:52:06 +01:00
justvanrossum
3ebde1bda5
allow localized name table entries
2018-11-01 09:44:56 +01:00
justvanrossum
53d743f427
adjust expected test output: we no longer output mac names
2018-11-01 09:41:58 +01:00
justvanrossum
53761c5e03
use more existing name table logic
2018-11-01 09:40:54 +01:00
justvanrossum
0a6cbc0be0
use existing helper func
2018-11-01 09:36:37 +01:00