diff --git a/pdf2htmlEX.1.in b/pdf2htmlEX.1.in index 4deffcc..b0da584 100644 --- a/pdf2htmlEX.1.in +++ b/pdf2htmlEX.1.in @@ -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 (Default: .ttf), --font-format (Default: truetype) diff --git a/src/pdf2htmlEX.cc b/src/pdf2htmlEX.cc index 8e7ed0f..09e9f57 100644 --- a/src/pdf2htmlEX.cc +++ b/src/pdf2htmlEX.cc @@ -83,7 +83,7 @@ void parse_options (int argc, char **argv) .add("space-as-offset", ¶m.space_as_offset, 0, "treat space characters as offsets") .add("stretch_narrow_glyph", ¶m.stretch_narrow_glyph, 0, "stretch narrow glyphs instead of padding space") .add("squeeze-wide-glyph", ¶m.squeeze_wide_glyph, 0, "squeeze wide glyphs instead of truncating") - .add("remove-unused-glyph", ¶m.remove_unused_glyph, 0, "remove unused glyphs in embedded fonts") + .add("remove-unused-glyph", ¶m.remove_unused_glyph, 1, "remove unused glyphs in embedded fonts") .add("font-suffix", ¶m.font_suffix, ".ttf", "suffix for extracted font files") .add("font-format", ¶m.font_format, "opentype", "format for extracted font files") diff --git a/test/test.py b/test/test.py index 8daeb38..5526d91 100755 --- a/test/test.py +++ b/test/test.py @@ -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)