1789 Commits

Author SHA1 Message Date
Sascha Brawer
6cab1e6c1d [GX] Use Microsoft/OpenType weight class for weight axis
https://www.microsoft.com/typography/otspec/os2.htm#wtc
2015-06-26 22:03:25 +02:00
Sascha Brawer
f83337dca3 Merge pull request #309 from brawer/interpol
[GX] Code snippet for building interpolated fonts
2015-06-26 21:23:30 +02:00
Sascha Brawer
ef98f8ac12 Use the same range as Skia for the weight axis
With this change, the "Thin" instance now renders fine, too.
Apparently, the axis values need to be positive; this was not
clear to me from reading the specification.
2015-06-26 21:14:12 +02:00
Cosimo Lupo
d75267fce5 Merge pull request #308 from anthrotype/fix_overwrite
[TTFont] wrap input file in a temporary stream to allow overwriting
2015-06-26 19:54:16 +02:00
Cosimo Lupo
4fd6373b92 [TTFont] keep input file open if we didn't open it 2015-06-26 18:30:18 +01:00
Sascha Brawer
97c7168749 [GX] Code snippet for building interpolated fonts 2015-06-26 13:29:33 +02:00
Cosimo Lupo
356c923411 [TTFont] wrap input file in a temporary stream to allow overwriting
Fixes https://github.com/behdad/fonttools/issues/302
2015-06-26 12:19:42 +01:00
Behdad Esfahbod
389c445760 Merge pull request #300 from brawer/fvar
[GX] Make it easier to construct ‘fvar’ tables from code
2015-06-26 01:48:03 -07:00
Behdad Esfahbod
e7795be277 Merge pull request #307 from garretrieger/master
Test for load a kern table with a bad glyph id.
2015-06-25 18:36:02 -07:00
Behdad Esfahbod
0c68f18361 Fix compile/decompile of kern table with invalid glyphs
Was "broken" in the performance work in commits
8724513a67f954eac56eeb77ced12e27d7c02b6b and
1d93f9099de4987c5c7d7e49a23f4c46a45dfab2.

Use slow method if exception raised.

The changes should move to TTFont layer itself.  I'll move them
in a separate commit.
2015-06-25 18:31:52 -07:00
Garret Rieger
8bebea7253 Test for load a kern table with a bad glyph id. 2015-06-25 18:17:04 -07:00
Behdad Esfahbod
16edc99440 Merge pull request #305 from anthrotype/fix_program_len
add doctests for __bool__ method in ttProgram.Program and _f_p_g_m
2015-06-25 11:46:47 -07:00
Cosimo Lupo
3a856eeef8 [ttProgram] add doctests for __bool__ method 2015-06-25 19:22:42 +01:00
Cosimo Lupo
efdb837075 [_f_p_g_m] add doctests for __bool__ method 2015-06-25 19:22:01 +01:00
Cosimo Lupo
ca6e5c4f0a Merge pull request #303 from anthrotype/fix_program_len
[ttProgram] add missing __len__ method to Program class
2015-06-25 20:06:05 +02:00
Cosimo Lupo
ac41b6086b [_f_p_g_m] remove __len__ method from fpgm (and prep) table 2015-06-25 19:03:39 +01:00
Cosimo Lupo
733c05f51d [_f_p_g_m] add __bool__ and __nonzero__ methods to fpgm table 2015-06-25 19:03:39 +01:00
Cosimo Lupo
ea9c2faecd [ttProgram] add __bool__ and __nonzero__ methods to Program 2015-06-25 19:03:39 +01:00
Cosimo Lupo
63ebca3ada Merge pull request #297 from anthrotype/fix_bitmaps
[E_B_D_T_] make 'bitmaps' directory in the same location as output TTX file
2015-06-25 10:54:18 +02:00
Sascha Brawer
3cb5c9ca7c Replace calls to obsolete unittest.assertEquals()
Since Python 2.7, unittest.assertEquals() has been deprecated.
https://docs.python.org/2.7/library/unittest.html#deprecated-aliases
2015-06-25 10:11:52 +02:00
Behdad Esfahbod
27ade7643b Default itemSize to 16 in getSearchRange()
For compat with original fonttools.

Fixes https://github.com/typesupply/woffTools/issues/1
2015-06-24 16:07:06 -07:00
Behdad Esfahbod
ee3b5c0b6f Speed up name.getDebugName()
Avoid decoding all strings, and break early if found English.
2015-06-24 15:30:06 -07:00
Sascha Brawer
5bd9ade399 [GX] Remove ‘fvar’ table definition from otTables.py
There now is a Python implementation of variation axes, because this
makes it (much) easier to build variable fonts from code. Therefore,
the definitions in otTables.py are not needed anymore.
2015-06-24 15:58:05 +02:00
Sascha Brawer
5772339f19 [GX] Minor: Address landscape.io complaints about ‘fvar’ handler 2015-06-24 15:53:02 +02:00
Sascha Brawer
53e7db624a [GX] Make it easier to construct ‘fvar’ tables from code
In the previous table-driven implementation, client code had to
know the internals of the ‘fvar’ structure for correctly adding
variation axes to a font. In the new implementation, clients
do not have to futz around with binary offsets (which makes it
more likely that tools build correct fonts).
2015-06-24 15:05:03 +02:00
Sascha Brawer
feeab5afa1 Merge pull request #299 from brawer/name
Helper function to find a debug string for a name
2015-06-24 14:58:25 +02:00
Sascha Brawer
29328f20e5 Helper function to find a debug string for a name
Useful for generating XML comments when tables refer to name IDs.
For example, XML for a named instance in an ‘fvar’ table is easier
to read when it says <!-- Bold --> in addition to nameID="258".
2015-06-24 09:08:19 +02:00
Cosimo Lupo
55e4704043 [E_B_D_T_] make extfile 'bitmaps' directory in same location as output file 2015-06-23 11:51:30 +01:00
Cosimo Lupo
1dfda2ef67 Merge pull request #296 from anthrotype/fix_ttList
[ttx] don't create output file if action is 'ttList'
2015-06-23 12:38:50 +02:00
Cosimo Lupo
7fffdb8815 [ttx] don't create output file if action is 'ttList' 2015-06-23 11:15:56 +01:00
Behdad Esfahbod
c7b6d1943d Fix decompiling of cmap table
Previously, if a subtable's data was shared amongst two different encodings,
the second one being loaded was getting a cmap member assigned while retaining
its data item.  If we subset the cmap and then save that subtable, the original
unsubset data will be written out.  Fix, but removing data when assigning cmap.

Explains and obviates mystery hack in subsetter.
2015-06-22 19:14:09 -07:00
Behdad Esfahbod
6cfb4f1d4f Revert "[subset] Remove ancient hack that I can't reproduce needing anymore"
This reverts commit 72f72d3c3fff3eea38ae41b86a10a78d8460e09d.

This broken subsetting of cmap, as privately reported by Adam to me.
Investigating some more.  I think I actually know what's going on.
2015-06-22 19:13:50 -07:00
Sascha Brawer
b3cda9ea22 Minor: Remove unused imports in ‘avar’ parser 2015-06-21 12:13:51 +02:00
Behdad Esfahbod
82c933c979 Merge pull request #294 from brawer/avar
[GX] Support 'avar' table
2015-06-19 15:18:44 -07:00
Sascha Brawer
cd3c28ab2d [GX] Support 'avar' table 2015-06-20 00:13:01 +02:00
Behdad Esfahbod
ca83ef2bf9 Merge pull request #277 from anthrotype/misspelling
[OS/2] fix misspellings 'usMaxContext', 'usFirstCharIndex', 'usLastCh…
2015-06-18 10:36:03 -07:00
Behdad Esfahbod
090c9b15fa Merge pull request #293 from anthrotype/fix_make_all
[setup.py] monkeypatch py_compile to halt compilation on syntax errors
2015-06-16 23:07:03 -07:00
Behdad Esfahbod
a7e1524d2a Merge pull request #278 from anthrotype/timestamp
[ttx] use TTX mtime for 'modified' (default), optionally "--recalc-timestamp"
2015-06-16 15:12:12 -07:00
Cosimo Lupo
679fe8965f [encodingTools] fix typo 2015-06-16 22:44:57 +01:00
Cosimo Lupo
eae49fd67c [ttx] use TTX file modification time for the font 'modified' (default) 2015-06-16 22:44:57 +01:00
Cosimo Lupo
262f0e9017 [timeTools] add timestampSinceEpoch function 2015-06-16 22:44:57 +01:00
Behdad Esfahbod
82b19a0d08 Merge pull request #279 from anthrotype/racecondition
[ttx] 'touch' output file to avoid race condition in choosing file names
2015-06-15 15:36:30 -07:00
Cosimo Lupo
72481f5050 [merge] fix TabError: inconsistent use of tabs and spaces in indentation 2015-06-14 19:45:20 +01:00
Cosimo Lupo
73a6fa8b11 [setup.py] monkeypatch py_compile to halt compilation on syntax errors
Fixes https://github.com/behdad/fonttools/issues/290
2015-06-14 00:22:43 +01:00
Cosimo Lupo
5052950f81 [OS/2] fix misspelled attributes, and keep them using property decorators 2015-06-13 23:19:18 +01:00
Cosimo Lupo
1d510c61a2 [ttx] 'touch' output file to avoid race condition in choosing file names
Fixes https://github.com/behdad/fonttools/issues/45
2015-06-13 22:42:10 +01:00
Behdad Esfahbod
6df41da4ff Use timestampNow() in merge.py 2015-06-12 16:11:31 -07:00
Behdad Esfahbod
72f72d3c3f [subset] Remove ancient hack that I can't reproduce needing anymore 2015-06-12 15:27:47 -07:00
Behdad Esfahbod
e7fe5b4db8 [subset] Minor log 2015-06-12 15:23:10 -07:00
Behdad Esfahbod
6406fcade0 [subset] Fix format 14 subsetting with glyphs_requested 2015-06-12 15:18:43 -07:00