Behdad Esfahbod
46c1fa8809
Bump fontTools.version to 2.5
...
Followup to
2a60b441b0 (commitcomment-7532556)
2014-08-27 03:01:44 -04:00
Behdad Esfahbod
aeeb884b4c
[ttx] Always add raw=True attribute when dumping DefaultTable to XML
...
Needed to avoid surprises when we add new table implementations.
Recently we added VDMX table, and that broke build of projects using
VDMX with DefaultTable, eg:
https://github.com/behdad/fonttools/issues/151
2014-08-24 13:01:27 -04:00
Behdad Esfahbod
bfe99090ba
Fix reading XML for CBLC with external image files
2014-08-19 12:40:12 -04:00
Behdad Esfahbod
de9d1a6e47
[subset] Always remove 'glyf' Glyph padding
...
Before we were only doing this, partially, if --no-hinting was requested.
Always remove padding. More savings.
2014-08-15 14:34:28 -04:00
Behdad Esfahbod
b342a27430
Add glyf.Glyph.trim() that removes padding and if asked hinting
2014-08-15 14:34:03 -04:00
Behdad Esfahbod
30852ad3b3
[subset] Add --gids-file
2014-08-14 11:37:35 -04:00
Behdad Esfahbod
946528fa25
[subset] Remove special handling of gidNNN, uniXXXX
...
We now have --gids and --unicodes, so only accept glyph names
on cmdline. Cleans up a few things.
Sorry about the breakage in advance everyone. :)
2014-08-13 21:30:25 -04:00
Behdad Esfahbod
590c8777a6
[subset] Add --ignore-missing-glyphs and --no-ignore-missing-unicodes
...
Move glyph checking into the subsetter. Also fix --gids. Previous
patch's implementation was wrong as it was picking up glyphs from
sorted glyph-name list, NOT the glyph order!
Fixes https://github.com/behdad/fonttools/issues/34
2014-08-13 21:18:24 -04:00
Behdad Esfahbod
28270fd6fe
[subset] Add --gids that takes list of glyph ids or ranges
...
Fixes https://github.com/behdad/fonttools/issues/113
2014-08-13 20:16:30 -04:00
Behdad Esfahbod
70723291bf
[subset] Fix --unicodes doc
2014-08-13 20:02:08 -04:00
Behdad Esfahbod
387d317dbe
[subset] "Support" VDMX
...
VDMX doesn't have glyph-specific data, so pass it through if requested.
We can actually load the table now, but it needs no subsetting anyway.
2014-08-13 19:56:11 -04:00
Behdad Esfahbod
bdaa75f9e7
[subset] Accept unicode ranges
...
Eg --unicodes=41-5a,61-7a to choose ASCII letters. Note that with
this, --unicodes-file accepts fontconfig .orth files that do not
include other files.
2014-08-13 19:44:04 -04:00
Behdad Esfahbod
702729a076
[subset] Add --unicodes and --unicodes-file
...
Fixes https://github.com/behdad/fonttools/pull/79
2014-08-13 19:30:17 -04:00
Behdad Esfahbod
03f8ad9dd8
Allow passing encoding to XMLWriter()
...
We don't support non-UTF-8 encodings, but reinstate the argument
such that existing code, like robofab, continues to work.
2014-08-13 19:06:51 -04:00
Behdad Esfahbod
175c54a9d1
[subset] allow for unicode-based name with suffixes in the subset list
...
Fixes https://github.com/behdad/fonttools/issues/133
That part of the code is becoming really messy, but I want to get
all the features in first, then clean up.
2014-08-13 18:29:11 -04:00
Behdad Esfahbod
4b0facbc68
[subset] Minor
2014-08-13 18:10:42 -04:00
Behdad Esfahbod
40198c9b4d
[subset] Accept separate on whitespace as well as comma
...
For all options, including the newly added --glyphs.
2014-08-13 18:08:16 -04:00
Behdad Esfahbod
315329845f
[subset] Add --glyphs
2014-08-13 18:06:31 -04:00
Behdad Esfahbod
f290394747
[subset] Rename --glyph-file to --glyphs-file
2014-08-13 17:48:46 -04:00
Behdad Esfahbod
015908415a
[subset] Add --output-file
...
As requested many many times:
Fixes https://github.com/behdad/fonttools/pull/79
Fixes https://github.com/behdad/fonttools/pull/15
Fixes https://github.com/behdad/fonttools/issues/44
2014-08-13 17:35:23 -04:00
Behdad Esfahbod
8e51079212
[subset] Minor
2014-08-13 17:32:33 -04:00
Behdad Esfahbod
eac1ee5373
[subset] Add --glyph-file
...
It only accepts PS glyph names, not gidNNN, U+XXXX, etc, as per
discussion here: https://github.com/behdad/fonttools/issues/113
Requested many times:
https://github.com/behdad/fonttools/pull/15
https://github.com/behdad/fonttools/pull/79
2014-08-13 17:32:33 -04:00
Behdad Esfahbod
3b34ea301a
[subset] Add --text-file
2014-08-13 16:55:47 -04:00
Behdad Esfahbod
1633d8e917
[subset] Allow pyftsubset --layout-features? etc
...
To see the current value of an option, pass a value of '?' to it, with
or without a '='.
Examples:
$ pyftsubset --glyph-names?
Current setting for 'glyph-names' is: False
$ ./pyftsubset --name-IDs=?
Current setting for 'name-IDs' is: [1, 2]
$ ./pyftsubset --hinting? --no-hinting --hinting?
Current setting for 'hinting' is: True
Current setting for 'hinting' is: False
Fixes https://github.com/behdad/fonttools/issues/142
2014-08-13 16:33:57 -04:00
Behdad Esfahbod
1e7cb631a8
[subset] Err if options are not provided for list values
2014-08-13 16:20:06 -04:00
Behdad Esfahbod
bce7ef7ede
[subset] Add looooooooonger usage
...
Based on text from Adam Twardoch.
Fixes https://github.com/behdad/fonttools/pull/15
2014-08-13 16:06:49 -04:00
Behdad Esfahbod
839f01f215
Merge pull request #143 from anthrotype/vdmx
...
A VDMX table converter
2014-08-13 15:22:06 -04:00
Cosimo Lupo
e386a1a408
update table's list through MetaTools/buildTableList.py
2014-08-13 19:51:47 +01:00
Cosimo Lupo
d9c0d38115
a VDMX table converter
2014-08-13 19:51:13 +01:00
Behdad Esfahbod
2b4a520a86
Bump version to 2.5, update maintainer and URL
...
https://github.com/behdad/fonttools/issues/140
2014-08-13 19:49:31 +01:00
Behdad Esfahbod
2a60b441b0
Bump version to 2.5, update maintainer and URL
...
https://github.com/behdad/fonttools/issues/140
2014-08-13 13:10:31 -04:00
Behdad Esfahbod
5ba7d98a41
[glyf] Only pad glyphs that are odd-lengthed
...
Ouch! Thinko.
2014-07-23 16:36:31 -04:00
Behdad Esfahbod
5ed7d154a9
Turn assert into warning
2014-07-23 16:28:34 -04:00
Behdad Esfahbod
3c4b5e0a09
[subset] Work around OTS bug with FDSelect format 0
...
a049b98c88
https://github.com/khaledhosny/ots/pull/31
Fixes https://github.com/behdad/fonttools/issues/138
2014-07-23 00:04:32 -04:00
Behdad Esfahbod
3a10a6546c
[glyf] Don't pad when removing hinting instructions
...
Finishes recent changes.
2014-07-22 21:48:19 -04:00
Behdad Esfahbod
9ab98b2d65
Adjust previous commit
2014-07-22 17:39:17 -04:00
Behdad Esfahbod
eef4daeeaa
Add padding to glyphs only if it makes it possible to use short loca
...
Otherwise don't add padding. This is against the spec, but "should"
work everywhere. The spec only says offsets "should" be padded:
"""Note that the local offsets should be long-aligned, i.e., multiples
of 4. Offsets which are not long-aligned may seriously degrade
performance of some processors."""
We don't add any padded that we absolutely don't have to. Should save
an average of one byte per glyph on large fonts.
2014-07-22 16:00:24 -04:00
Behdad Esfahbod
c6b031d661
Only use two-byte offsets in loca table if all offsets are even
...
Otherwise it will mess up.
2014-07-22 15:49:04 -04:00
Behdad Esfahbod
30ff4ab869
Minor debug output improvement
2014-07-22 15:37:17 -04:00
Behdad Esfahbod
4af65b0f3d
[py23] Minor refactoring
2014-07-21 13:19:53 -04:00
Behdad Esfahbod
e6adebdc4a
Make glyf-table glyph loading lazy by default
...
When I added the font.lazy setting, I made glyf table non-lazy
by default. This is helpful to users who typically access glyphs
like:
glyf_table.glyphs[glyfname]
instead of the correct way:
glyf_table[glyfname]
and also forget to call expand() on the glyph. However, this
significantly slows down most scripts that load the font without
lazy=True... As such, add a third mode to laziness. By default
lazy=None and does NOT expand glyphs. If lazy=False is passed
in, all glyphs are loaded.
I hope this is an acceptable middle ground and not too confusing.
2014-07-14 20:02:37 -04:00
Behdad Esfahbod
9bd685a3ec
[cmap] Remove bogus use of font.lazy
...
Ouch!
2014-07-14 20:01:04 -04:00
Behdad Esfahbod
671bca785d
[glyf] Align glyphs at word boundaries, not long
...
Saves two bytes per glyph on average. Or as Roozbeh reports,
70kb in DroidSansFallbackFull.ttf.
2014-07-14 19:53:42 -04:00
Behdad Esfahbod
68921c97ea
[merge] Fails if 'GSUB' table not present
...
Fixes https://github.com/behdad/fonttools/issues/135
Or does it?
2014-07-09 17:13:16 -04:00
Behdad Esfahbod
bc7cf1fd5d
[cffLib] Packing charset with only .notdef glyph fails
...
Fixes https://github.com/behdad/fonttools/issues/136
2014-07-09 14:30:06 -04:00
Behdad Esfahbod
d04dc9df11
[merge] Add preliminary support for BASE table
2014-07-03 14:01:44 -04:00
Behdad Esfahbod
6cc8bc3dbd
[merge] Support Extension lookups
2014-07-03 13:46:23 -04:00
Behdad Esfahbod
88d4decc5f
[subset] Handle None ChainContext
...
Fixes https://github.com/behdad/fonttools/issues/134
2014-07-02 17:09:22 -04:00
Behdad Esfahbod
dff3346ead
[subset] Handle case of None ChainContext class with non-zero chain
...
It would be a font bug, but handle regardless.
2014-07-02 17:09:18 -04:00
Behdad Esfahbod
56a9c4cb42
[subset] Fix order of chain for consistency
...
I'm confident I haven't broken anything.
2014-07-02 16:57:26 -04:00