Behdad Esfahbod
e6f5ba6e9c
Whitespace
2015-05-27 17:04:37 -07:00
Cosimo Lupo
175a16209c
[setup.py] use setuptools if available, or fall back to distutils
...
modify scripts to work as setuptools 'console_scripts', where the main
function takes no arguments;
add empty identifier "" in 'packages' argument of setup, to install the
standalone sstruct.py and xmlWriter.py for legacy support;
remove py2exe since it is made redundant by setuptools 'console_scripts';
remove custom 'build_ext' command since the eexecOpmodule.c is no longer
present.
2015-05-20 11:02:43 +01:00
Sascha Brawer
49ce1681cd
Change whitespace in subset.py to conform with Python style guide
...
The Python style (outside of Google) is four spaces for indentation.
After this change, pylint still has complaints about this file,
but these formatting changes will probably improve the health
metrics of landscape.io. Personally, I couldn't care less about
whitespace, but it is hard to spot actual problems in a sea
of lint warnings.
2015-05-07 10:40:29 +02:00
Sascha Brawer
5cda3d4e72
Minor fixes to reduce the number of code smells
2015-05-06 19:17:08 +02:00
Behdad Esfahbod
f5cbeea491
[subset] Fix after c4d04000047b4284341f58a28a70e821c1129d6b
...
Fixes https://github.com/behdad/fonttools/pull/254
2015-04-30 18:39:04 -04:00
Behdad Esfahbod
bd67253118
Some more whitespace fixes from pep8 tool
2015-04-26 01:59:01 -04:00
Behdad Esfahbod
cc072eca9f
Use utf_16_be instead of utf_16be
...
That's the canonical name.
https://github.com/behdad/fonttools/issues/236
2015-04-24 12:48:37 -07:00
Behdad Esfahbod
ffd2e35371
[subset] Add note re --desubroutinize resulting in smaller WOFF/WOFF2
2015-04-22 16:02:59 -07:00
Behdad Esfahbod
aa74114f1d
Use cannonical encoding ids
2015-04-20 18:21:46 -07:00
Behdad Esfahbod
f419f572db
Add TODO
2015-04-16 16:35:51 -07:00
Behdad Esfahbod
24264cb7f8
[subset] Fix chaos handling to be more inclusive
...
If a contextual lookup recurses twice on the same index, that index
most be marked chaotic for the second recursion.
Also, when a non-1-to-1 recursion happens, only mark glyph locations
after current to be chaotic, not everything.
I believe this fixes a bug that before we were not inclusive enough.
Now we might have introduced more false positives, but we are at least
correct.
2015-04-01 18:51:52 -07:00
Behdad Esfahbod
2a7007df7b
[subset] Indent
2015-04-01 18:22:51 -07:00
Behdad Esfahbod
9ab1d2f968
[subset] Minor
2015-04-01 18:18:56 -07:00
Behdad Esfahbod
13d48da3a9
[subset] Avoid duplicate recursions in closure_glyphs() for contextuals
...
Speeds up NotoNastaliqUrdu from 50s to 1.8s.
2015-04-01 18:15:01 -07:00
Behdad Esfahbod
4a3dcd589e
[subset] Whitespace
2015-04-01 17:51:54 -07:00
Behdad Esfahbod
22ffbba4b7
[subset] Further narrow down cur_glyphs in recursive contextuals
...
Improves NotoNastaliqDraft closure_glyphs() time from 60s to 50s.
This was originally introduced in 1d4fa13b4. I'm fairly confident
new code is correct.
2015-04-01 17:45:55 -07:00
Behdad Esfahbod
c4d0400004
[subset] Speed up closure_glyphs() a bit
...
Was taking nine minutes on NotoNastaliqUrdu font.
With these changes it takes only(1) one minute now.
More coming.
2015-04-01 17:34:38 -07: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
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
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
Cosimo Lupo
8b081fed0b
added --legacy-kern option to drop TrueType kern if GPOS is available
2014-09-30 19:29:53 +01:00
Cosimo Lupo
450f8d42bb
updated __doc__
2014-09-25 15:42:13 +01:00
Cosimo Lupo
a73530aa79
added --obfuscate-names to make webfont unusable as a system font
2014-09-25 15:19:38 +01:00
Behdad Esfahbod
1f5b00bbbf
[subset] Add --unicodes='*' and --glyphs='*'
2014-09-22 23:32:23 +02: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
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
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
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