mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
remove-unused-glyphs is now default
This commit is contained in:
parent
baf6ad22b6
commit
a67a74fd51
@ -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)
|
.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.
|
If set to 1, glyphs wider than described in PDF will be squeezed; otherwise it will be truncated.
|
||||||
.TP
|
.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.
|
[Experimental] If set to 1, remove unused glyphs in embedded fonts in order to reduce the file size.
|
||||||
.TP
|
.TP
|
||||||
.B --font-suffix <suffix> (Default: .ttf), --font-format <format> (Default: truetype)
|
.B --font-suffix <suffix> (Default: .ttf), --font-format <format> (Default: truetype)
|
||||||
|
@ -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("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("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("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-suffix", ¶m.font_suffix, ".ttf", "suffix for extracted font files")
|
||||||
.add("font-format", ¶m.font_format, "opentype", "format for extracted font files")
|
.add("font-format", ¶m.font_format, "opentype", "format for extracted font files")
|
||||||
|
@ -13,7 +13,7 @@ with open('out.html','w') as outf:
|
|||||||
if not f.lower().endswith('.pdf'):
|
if not f.lower().endswith('.pdf'):
|
||||||
continue
|
continue
|
||||||
print f
|
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
|
print "error on ", f
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user