Behdad Esfahbod
467a0369e4
Fix test on Python 2.6
2015-03-03 16:05:25 -08:00
Behdad Esfahbod
1296c7457e
Make tests pass with Python3
...
In python3, str(float) is noisy. Always format floats using "%g".
2015-03-03 15:54:37 -08:00
Behdad Esfahbod
e02b9ea05b
Fix tests to return failures
2015-03-03 10:47:40 -08:00
Behdad Esfahbod
f192400039
Fix checks; add run-tests.sh
2015-03-03 09:57:41 -08:00
Behdad Esfahbod
612c70dada
[SVG] Support gzip-compressed SVG tables
...
Set font['SVG '].compressed=True to enable. Here's a snippet to convert a
WOFF-compressed SVG+OpenType font to a compressed SVG+OpenType non-WOFF font:
from fontTools.ttLib import TTFont
font = TTFont("NotoColorEmojiSvg.woff")
font['SVG '].compressed=True
font.flavor=None
font.save("NotoColorEmojiSvgCompressed.ttf")
2015-03-02 15:41:57 -08:00
Behdad Esfahbod
b1f46be65c
Minor
2015-03-02 15:22:39 -08:00
Behdad Esfahbod
9fc8ac0559
Whitespace
2015-03-02 13:05:29 -08:00
Behdad Esfahbod
5a7ec608c8
Fix SVG doc length calculations
...
Patch from Doug Felt.
2015-02-23 14:03:06 -08:00
Erik
eb1c0f7fba
identifier keyword to beginPath
...
mathGlyph -> PointToSegmentPen -> drawPoints -> pointPen -> beginPath
gets an ‘identifier’ argument from the ufo3 drawPoints. Which trips an
error. This alleviates the problem but does not address anything that
beginPath should be doing with the identifier.
2015-02-22 09:45:07 +01:00
vitalyvolkov
3042fcf989
Handle exception IndexError when accessing out of range glyphs
2015-02-02 13:47:55 +02:00
Behdad Esfahbod
8af5c69ea0
Unbreak backward compatibility re _h_e_a_d.mac_epoch_diff
...
Fixes https://github.com/behdad/fonttools/issues/210
2015-01-22 11:21:43 -08:00
Behdad Esfahbod
21af87536f
[cmap] Split last segment of a format 4 efficiently
...
Fixes https://github.com/behdad/fonttools/issues/189
2015-01-22 00:10:01 -08:00
Behdad Esfahbod
0d5d12e02a
Adjust 'feat' table format
...
As discussed here:
730bedd3d1
2015-01-21 15:46:30 -08:00
Behdad Esfahbod
4362cb49f3
In getGlyphSet(), pull glyph advance from hmtx even for CFF fonts
...
That's the right thing to do.
Also fixes this:
https://github.com/robofab-developers/robofab/issues/28
2015-01-08 12:53:58 -08:00
Behdad Esfahbod
8ef5adc4af
Move draw() implementation to a better place
2015-01-08 12:28:42 -08:00
schriftgestalt
adfe7f293a
add some missing return values
2015-01-08 09:46:13 -08:00
Behdad Esfahbod
a0dfcb496e
Align instruction comments at tab stop
...
Makes them much more readable.
2015-01-05 17:49:38 -08:00
schriftgestalt
5d66d59a1f
Add comments with names of TrueType instruction to assembly
2015-01-05 17:45:09 -08:00
Sam Fishman
de66a6466c
[subset] Add --desubroutinize
...
This seems to both make the font smaller for small subsets, and works
around a bug in our CFF hint stripping logic.
So, if you are passing --no-hinting, do pass --desubroutinize.
2015-01-05 15:53:56 -08:00
Olivier Berten (selapa.net)
ff84e2dadd
Regard very low datetimes as unix timestamps
2015-01-03 23:04:10 +01:00
Behdad Esfahbod
8a7a20c4b1
Fix indent
2015-01-02 13:14:26 -08:00
Behdad Esfahbod
b056318ca9
Ignore top four bytes of head table timestamps
...
Warn instead.
2015-01-02 13:08:57 -08:00
Behdad Esfahbod
15f2bb1e2f
Fixup previous commit
2015-01-02 13:02:36 -08:00
Behdad Esfahbod
ee425b4350
Adjust for Python 3.3 change in gmtime() exception type
...
https://github.com/behdad/fonttools/issues/99#issuecomment-66776810
Fixes https://github.com/behdad/fonttools/issues/99
2015-01-02 12:54:19 -08:00
Behdad Esfahbod
f0200def0c
Refactor timestamp code into misc.timeTools
2015-01-02 12:53:16 -08:00
Behdad Esfahbod
d86755bd45
Really fix fixedToFloat() this time
...
And simplify. Fixes regression introduced two commits ago.
Fixes https://github.com/behdad/fonttools/issues/205
2014-12-29 11:56:39 -08:00
Behdad Esfahbod
db3b2817bf
Add more tests to fixedToFloat(), showing previous commit is broken
...
Fix coming.
2014-12-29 11:30:48 -08:00
Behdad Esfahbod
97a07ce536
Improve fixedtoFloat()
...
Fixes https://github.com/behdad/fonttools/issues/205
2014-12-28 23:52:46 -08:00
Behdad Esfahbod
4447a76c33
[subset] If DSIG is to be retained, drop all signatures
...
Now DSIG can be retained by passing --drop-tables-=DSIG.
The embedded signatures will be dropped but empty table
retained.
Fixes https://github.com/behdad/fonttools/issues/145
2014-12-09 19:02:39 -08:00
Behdad Esfahbod
3560ee4c43
[subset] Update maxp values when dropping hinting
...
Fixes https://github.com/behdad/fonttools/issues/201
2014-12-09 18:53:37 -08:00
Lasse Fister
e875cfe3ec
Add default layerOrder to writeLayerContents
2014-12-08 23:11:55 +01:00
Lasse Fister
24676b3ebb
Repair and refactor UFOWriter._writePlist to be more DRY
...
`UFOWriter._writePlist` constructs the full path to the file to be written;
but the calling code did so, too.
This reliefs the calling code of `UFOWriter._writePlist` from knowing
how to construct the full path and thus makes the code more DRY.
Also, this fixes the faulty behavior that was caused by the double
path construction.
A further new helper `UFOWriter._deleteFile` was added to fully enable the
removal of path construction in the callers.
2014-12-08 23:10:46 +01:00
Lasse Fister
b498155890
use shared _getPlist implementation in UFOWriter
2014-12-08 21:33:39 +01:00
Lasse Fister
d8788cc8d5
prepare sharing of UFOReader._getPlist implementation
2014-12-08 21:33:33 +01:00
Lasse Fister
39af9f6495
Refactor and fix wrong usage of UFOReader._readPlist
...
All cases where UFOReader._readPlist was used suffered
from calling it with the fully constructed path where
it expected just the relative path/fileName of the plist.
Also, all cases had the similiar pattern of checking if
the file exists before trying to read it.
This replaces that pattern by `_getPlist`. The method has
a `default` argument that acts similar to the `default`
argument of the builtin function `getattr` i.e. when
`default is None` the requested plist is mandatory.
2014-12-08 21:31:46 +01:00
Lasse Fister
d8dccbfe9b
Add additional location for xmlWriter
...
Analogous to 42b7d1239e
by @benkiel
2014-12-08 21:27:50 +01:00
Lasse Fister
418b6859c8
Define UFOReader._checkForFile as an alias of os.path.exists
...
Maybe we should rather replace it with os.path.exists, as this
would make the code easier to read. Also os.path.exists is already
used very often in ufoLib.__init__
2014-12-08 21:27:24 +01:00
moyogo
2499ea3521
[TSI1] use tobytes()
2014-12-02 21:58:45 +00:00
moyogo
6021331a70
[TSI1] Use bytes literal
2014-12-02 21:45:21 +00:00
Behdad Esfahbod
3715f2d354
Unbreak Python3
...
Fixes https://github.com/behdad/fonttools/issues/197
2014-12-01 13:33:19 -08:00
Behdad Esfahbod
b1a8f7f8ec
Remove support for overwriting a table twice in SFNTWriter
...
Was slightly broken already. Remove it as there's no reason
to allow that.
2014-12-01 13:33:19 -08:00
moyogo
450faba7c3
Res is not available in Python 3
2014-11-21 17:07:55 +00:00
Behdad Esfahbod
ddb95b6a54
Revert "Add back fontTools.xmlWriter"
...
This reverts commit f8c35b6f98717a3f1f799b722e3bcd5b9303735c.
2014-11-09 17:55:05 -08:00
Behdad Esfahbod
f8c35b6f98
Add back fontTools.xmlWriter
...
Fixes https://github.com/behdad/fonttools/issues/190
2014-10-28 23:50:59 -07:00
Behdad Esfahbod
da6497ea1f
[subset] Fix example
...
Fixes https://github.com/behdad/fonttools/issues/192
2014-10-15 14:15:49 -07:00
Cosimo Lupo
a4aa9f2532
[subset] drop nameIDs 16, 17 and 18 if obfuscate_name
2014-10-08 11:42:36 +01:00
Behdad Esfahbod
19dadb37d6
One can't import fontTools.subset and fontTools.merge together
...
Fixes https://github.com/behdad/fonttools/issues/177
2014-10-07 17:37:29 -07:00
Cosimo Lupo
d5660cdd0c
also obfuscate name-IDs 16, 17 and 18
2014-10-07 13:36:10 +01:00
Behdad Esfahbod
730bedd3d1
[AAT] Add support for 'feat' table
...
Reusing the otData machinery.
See discussion at:
https://github.com/behdad/fonttools/issues/178
https://github.com/behdad/fonttools/pull/180
2014-09-30 19:04:16 -04:00
Behdad Esfahbod
5dd64deacb
[otData] add ULong types
...
In preparation for implementing AAT tables (slowly).
2014-09-30 18:55:57 -04:00