1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-06-28 23:09:01 +00:00

remove-unused-glyphs is now default

This commit is contained in:
Lu Wang 2012-10-06 20:44:08 +08:00
parent baf6ad22b6
commit a67a74fd51
3 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ If set to 1, glyphs narrower than described in PDF will be strecth; otherwise sp
.B --squeeze_wide_glyph <0|1> (Default: 0)
If set to 1, glyphs wider than described in PDF will be squeezed; otherwise it will be truncated.
.TP
.B --remove-unused-glyph <0|1> (Default: 0)
.B --remove-unused-glyph <0|1> (Default: 1)
[Experimental] If set to 1, remove unused glyphs in embedded fonts in order to reduce the file size.
.TP
.B --font-suffix <suffix> (Default: .ttf), --font-format <format> (Default: truetype)

View File

@ -83,7 +83,7 @@ void parse_options (int argc, char **argv)
.add("space-as-offset", &param.space_as_offset, 0, "treat space characters as offsets")
.add("stretch_narrow_glyph", &param.stretch_narrow_glyph, 0, "stretch narrow glyphs instead of padding space")
.add("squeeze-wide-glyph", &param.squeeze_wide_glyph, 0, "squeeze wide glyphs instead of truncating")
.add("remove-unused-glyph", &param.remove_unused_glyph, 0, "remove unused glyphs in embedded fonts")
.add("remove-unused-glyph", &param.remove_unused_glyph, 1, "remove unused glyphs in embedded fonts")
.add("font-suffix", &param.font_suffix, ".ttf", "suffix for extracted font files")
.add("font-format", &param.font_format, "opentype", "format for extracted font files")

View File

@ -13,7 +13,7 @@ with open('out.html','w') as outf:
if not f.lower().endswith('.pdf'):
continue
print f
if os.system('pdf2htmlEX --dest-dir html --auto-hint=1 --external-hint-tool="ttfautohint" --remove-unused-glyph 0 "%s/%s"' % (DIR,f)) != 0:
if os.system('pdf2htmlEX --dest-dir html --auto-hint=1 --external-hint-tool="ttfautohint" --remove-unused-glyph 1 "%s/%s"' % (DIR,f)) != 0:
print "error on ", f
sys.exit(-1)