Cosimo Lupo
63c86b4db3
Merge pull request #1236 from anthrotype/bad-classdef-fmt
...
Allow decompiling bad ClassDef tables with invalid format
2018-04-16 13:55:47 +02:00
Cosimo Lupo
8ee3f016d7
Merge pull request #1242 from anthrotype/stat-1.2
...
[varLib] make STAT 1.2, and reuse fvar nameIDs
2018-04-16 13:55:23 +02:00
Cosimo Lupo
ffc7dfc23d
[varLib] don't need to read nameTable in _add_stat
...
for now at least...
2018-04-16 12:55:51 +02:00
youlun
2bcca15c56
Add font-number parameter for subset
2018-04-16 12:47:25 +02:00
Cosimo Lupo
f688d4bb86
[Tests/varLib] adjust STAT expected test data
2018-04-16 12:40:02 +02:00
Cosimo Lupo
08c30e9fde
[varLib] make STAT v1.2, reuse fvar nameIDs
...
Fixes https://github.com/googlei18n/fontmake/issues/417
2018-04-16 12:40:02 +02:00
justvanrossum
4256e6c6bf
make doctests independent of dict order repr
2018-04-16 10:33:30 +02:00
justvanrossum
16b7d424dd
Module containing a function to add conditional substitutions to a variable font
2018-04-16 10:21:19 +02:00
Behdad Esfahbod
6a88c39834
[varLib.plot] Show master locations
2018-04-14 14:43:42 +02:00
Behdad Esfahbod
113558ac7d
[varLib.plot] Set axis limits to -1,+1
2018-04-13 18:48:34 +02:00
Cosimo Lupo
78faa0c416
subset: minor: remove duplicate 'cvar' from list of hinting tables
2018-04-13 17:39:10 +02:00
Behdad Esfahbod
ebdd52512b
[subset] Passthrough 'cvar'
...
https://github.com/fonttools/fonttools/issues/1237#issuecomment-381150772
2018-04-13 16:38:46 +02:00
Cosimo Lupo
4dfc7bf24e
subset: remove assert to handle HVAR direct mapping
...
It looks like this was (at least partially) implemented in
f01c86ca9b
Should fix https://github.com/fonttools/fonttools/issues/1237
I'm still not sure about that "File a bug." when AdvWidthMap is None,
but either LsbMap or RsbMap are not None..
And we still need to add tests for this though.
2018-04-13 15:16:31 +02:00
Cosimo Lupo
dde854d285
Allow decompiling bad ClassDef tables with invalid format
...
Fixes https://github.com/fonttools/fonttools/issues/1235
2018-04-13 12:58:29 +02:00
Cosimo Lupo
c5c161c055
t1Lib: add 'kind' argument to T1Font constructor
...
fixes issue introduced with last commit
b1fd6fbbcd
t1Lib_test.py::test_parse_lwfn was relying on 'path' being None.
2018-04-13 12:55:24 +02:00
Cosimo Lupo
b1fd6fbbcd
t1Lib: make 'path' argument required
2018-04-12 15:21:25 +02:00
Cosimo Lupo
cc8551df80
Merge pull request #1234 from fonttools/type1-ps-encoding
...
allow an encoding to be specified when parsing a Type 1 font
2018-04-12 15:08:07 +02:00
justvanrossum
52ea50f4bc
allow an encoding to be specified when parsing a Type 1 font
2018-04-12 14:39:44 +02:00
Cosimo Lupo
0d474737d7
Merge pull request #1231 from hoeflerco/fix-tagComparison
...
Fixes the eq comparison of the Tag object to work in a comparison with None type
2018-04-05 10:46:03 +02:00
Cosimo Lupo
bd08d9b7d9
Merge pull request #1232 from andyzickler/context-guard-ttfont
...
Add context guard to ttfont
2018-04-04 08:39:54 +02:00
Cosimo Lupo
cc0c55bc0f
Merge pull request #135 from miguelsousa/small-fixes
...
Small fixes
2018-04-04 08:05:05 +02:00
Miguel Sousa
3e8ca172ab
Small fixes
2018-04-03 17:36:41 -07:00
Andy Zickler
1e2ee8e15e
Add context guard to ttfont
2018-04-03 18:08:52 -04:00
Andy Clymer
a3307324ae
Includes a suggested fix from @anthrotype
2018-04-03 15:40:54 -04:00
Andy Clymer
241a4474b4
Fixes the eq comparison of the Tag object to work with a None type
2018-04-03 14:54:39 -04:00
Cosimo Lupo
5db9309167
Bump version: 3.25.0 → 3.25.1.dev0
2018-04-03 13:58:14 +01:00
Cosimo Lupo
852f993c28
Release 3.25.0
2018-04-03 13:58:13 +01:00
Cosimo Lupo
710939174d
Update changelog
2018-04-03 13:58:01 +01:00
Cosimo Lupo
0055f9414c
models: convert delta array to float if overflows signed short integers
...
We should check other places where such overflows may occur and do the same.
Or do maybe it in GlyphCoordinates class.
2018-04-03 11:40:44 +01:00
Cosimo Lupo
6b6c34ab1a
otTables: fix IndexError while pruning of HVAR pre-write
2018-04-03 10:28:27 +01:00
Behdad Esfahbod
a523a69716
[varLib.models] Improve model
...
When adding a master and computing its support, when hitting another master,
we don't need to limit our box in every direction; we just need to limit in
one so we don't hit the older master with our support. Implement heuristic
that takes the first axis that minimizes the area loss.
This is not perfect, but a good improvement.
Before:
$ fonttools varLib.models 0,0 0,1 1,0 1,1 .4,0 .6,1 .5,.5 .7,.9Sorted locations:
[{},
{'A': 0.4},
{'A': 1.0},
{'B': 1.0},
{'A': 1.0, 'B': 1.0},
{'A': 0.6, 'B': 1.0},
{'A': 0.5, 'B': 0.5},
{'A': 0.7, 'B': 0.9}]
Supports:
[{},
{'A': (0, 0.4, 1.0)},
{'A': (0.4, 1.0, 1.0)},
{'B': (0, 1.0, 1.0)},
{'A': (0, 1.0, 1.0), 'B': (0, 1.0, 1.0)},
{'A': (0, 0.6, 1.0), 'B': (0, 1.0, 1.0)},
{'A': (0, 0.5, 1.0), 'B': (0, 0.5, 1.0)},
{'A': (0.5, 0.7, 1.0), 'B': (0.5, 0.9, 1.0)}]
After:
$ fonttools varLib.models 0,0 0,1 1,0 1,1 .4,0 .6,1 .5,.5 .7,.9
Sorted locations:
[{},
{'A': 0.4},
{'A': 1.0},
{'B': 1.0},
{'A': 1.0, 'B': 1.0},
{'A': 0.6, 'B': 1.0},
{'A': 0.5, 'B': 0.5},
{'A': 0.7, 'B': 0.9}]
Supports:
[{},
{'A': (0, 0.4, 1.0)},
{'A': (0.4, 1.0, 1.0)},
{'B': (0, 1.0, 1.0)},
{'A': (0, 1.0, 1.0), 'B': (0, 1.0, 1.0)},
{'A': (0, 0.6, 1.0), 'B': (0, 1.0, 1.0)},
{'A': (0, 0.5, 1.0), 'B': (0, 0.5, 1.0)},
{'A': (0, 0.7, 1.0), 'B': (0.5, 0.9, 1.0)}]
(Note the last line.)
2018-03-28 02:11:49 -07:00
Behdad Esfahbod
28000a4195
[varLib.plot] Display master names
2018-03-28 01:57:59 -07:00
Behdad Esfahbod
34458fe347
[varLib.plot] Label axes
2018-03-28 01:44:27 -07:00
Behdad Esfahbod
0359daad3d
Revert "[varLib.models] Improve modeling"
...
This reverts commit e4d363cc5c14471b02a98657e9bc04b75109c687.
2018-03-28 01:38:10 -07:00
Behdad Esfahbod
7504bde11b
[varLib.plot] Take input like varLib.models does
...
Eg.:
$ fonttools varLib.plot 0,0 0,1 1,0 1,1 .4,0 .6,1 .5,.5 .7,.7 .6,.9 .9,.6
2018-03-28 01:35:18 -07:00
Behdad Esfahbod
049020d52c
[varLib.plot] Draw a subplot for each master
...
Looks much nicer now.
2018-03-28 01:24:52 -07:00
Behdad Esfahbod
e4d363cc5c
[varLib.models] Improve modeling
...
After:
jj
2018-03-28 01:17:54 -07:00
Cosimo Lupo
2ef60fa989
varLib.mutator: add -o option, use argparse
2018-03-27 14:06:37 +01:00
Behdad Esfahbod
1bf955fb08
Err, forgot to link issue to previous commit
...
https://github.com/googlei18n/fontmake/issues/264
2018-03-26 20:46:26 -07:00
Behdad Esfahbod
42bef176a3
[varLib] Tweak support-resolution algorithm
...
Improve varLib model algorithm.
This, basically means any varfont built that had an unusual master
configuration will change when rebuilt.
Here's a good test: a two-axis with 8 masters at unusual locations:
2-----------------5----------3
| |
| 7 |
| |
| 6 |
| |
| |
| |
0-----------4----------------1
Previously, the reach of master 3 (Black Extended) would
have started from A=.4, ie, the A position of master 4.
It now correctly starts from 0. Same thing with masters
after it. Ie, master 5 gets a span on the A axis from
0 to 1, whereas before it was getting from .4 to 1.
Previously, the on-axis masters always cut the space. They
don't anymore. That's more consistent, and fixes the main
issue Erik showed at TYPO Labs 2017. Same issue was also
causing the reach of master 3 to be limited, which I think
is the issue being discussed in the linked issue. Both should
be fixed.
It's hard to describe exactly what happened before / after.
Best to read the actual support values:
Before:
Sorted locations:
$ ./fonttools varLib.models 0,0 0,1 1,0 1,1 .4,0 .6,1 .5,.5 .7,.7
[{},
{'A': 0.4},
{'A': 1.0},
{'B': 1.0},
{'A': 1.0, 'B': 1.0},
{'A': 0.6, 'B': 1.0},
{'A': 0.5, 'B': 0.5},
{'A': 0.7, 'B': 0.7}]
Supports:
[{},
{'A': (0.0, 0.4, 1.0)},
{'A': (0.4, 1.0, 1.0)},
{'B': (0.0, 1.0, 1.0)},
{'A': (0.4, 1.0, 1.0), 'B': (0.0, 1.0, 1.0)},
{'A': (0.4, 0.6, 1.0), 'B': (0.0, 1.0, 1.0)},
{'A': (0.4, 0.5, 1.0), 'B': (0.0, 0.5, 1.0)},
{'A': (0.5, 0.7, 1.0), 'B': (0.5, 0.7, 1.0)}]
After:
$ ./fonttools varLib.models 0,0 0,1 1,0 1,1 .4,0 .6,1 .5,.5 .7,.7
Sorted locations:
[{},
{'A': 0.4},
{'A': 1.0},
{'B': 1.0},
{'A': 1.0, 'B': 1.0},
{'A': 0.6, 'B': 1.0},
{'A': 0.5, 'B': 0.5},
{'A': 0.7, 'B': 0.7}]
Supports:
[{},
{'A': (0, 0.4, 1.0)},
{'A': (0.4, 1.0, 1.0)},
{'B': (0, 1.0, 1.0)},
{'A': (0, 1.0, 1.0), 'B': (0, 1.0, 1.0)},
{'A': (0, 0.6, 1.0), 'B': (0, 1.0, 1.0)},
{'A': (0, 0.5, 1.0), 'B': (0, 0.5, 1.0)},
{'A': (0.5, 0.7, 1.0), 'B': (0.5, 0.7, 1.0)}]
TODO: We should add this as a test case.
There's another improvement I want to make, but that's separate.
2018-03-26 20:32:27 -07:00
Behdad Esfahbod
05e2ec4d3a
[varLib.models] Add main()
...
Takes positions and prints model results:
$ ./fonttools varLib.models 0,0 0,1 1,0 1,1 .4,0 .6,1 .5,.5
Sorted locations:
[{},
{'A': 0.4},
{'A': 1.0},
{'B': 1.0},
{'A': 1.0, 'B': 1.0},
{'A': 0.6, 'B': 1.0},
{'A': 0.5, 'B': 0.5}]
Supports:
[{},
{'A': (0.0, 0.4, 1.0)},
{'A': (0.4, 1.0, 1.0)},
{'B': (0.0, 1.0, 1.0)},
{'A': (0.4, 1.0, 1.0), 'B': (0.0, 1.0, 1.0)},
{'A': (0.4, 0.6, 1.0), 'B': (0.0, 1.0, 1.0)},
{'A': (0.4, 0.5, 1.0), 'B': (0.0, 0.5, 1.0)}]
2018-03-26 20:10:15 -07:00
Behdad Esfahbod
2349ff37fd
[fontTools.varLib.plot] New module to plot a designspace's VariationModel
...
The visualization is not as useful as I was hoping would be :(.
2018-03-26 18:42:23 -07:00
Cosimo Lupo
a952c12156
Bump version: 3.24.2 → 3.24.3.dev0
2018-03-26 23:05:15 +01:00
Cosimo Lupo
3ae981c42a
Release 3.24.2
2018-03-26 23:05:15 +01:00
Cosimo Lupo
814565ffc7
Update changelog
...
[ci skip]
2018-03-26 23:05:08 +01:00
Behdad Esfahbod
d3a6a4e9e4
Don't fail during ValueRecord copy if src has more items
...
We drop hinting by simply changing ValueFormat, without cleaning
up the actual ValueRecords. This was causing failure at this assert
if font was subsetted without hinting and then passed to mutator.
2018-03-26 12:54:57 -07:00
Cosimo Lupo
3dbb7f763f
[merge] LookupList may be None
2018-03-26 15:32:13 +01:00
Cosimo Lupo
7aa8794141
Merge pull request #132 from benkiel/master
...
Get rid of Python 3.4, add in Python 3.6
2018-03-23 14:52:27 +00:00
Ben Kiel
400f39cbc4
Forgot about .travis.yml
2018-03-21 22:04:37 -05:00
Ben Kiel
25bbd89c8f
Get rid of Python 3.4, add in Python 3.5
2018-03-21 21:56:01 -05:00