diff --git a/README.md b/README.md index b9997c8..fedb895 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ A beautiful demo is worth a thousand words: -- **Typography**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/geneve.html) / [MediaFire](http://www.mediafire.com/view/?fqbc2d2o1kdz51a) / [Original](https://github.com/raphink/geneve_1564/raw/master/geneve_1564.pdf) -- **Formulas**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/cheat.html) / [MediaFire](http://www.mediafire.com/view/?84vdgrepkxclbq2) / [Original](http://www.tug.org/texshowcase/cheat.pdf) -- **Scientific Paper**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/demo.html) / [MediaFire](http://www.mediafire.com/view/?6po429kz9czcga2) / [Original](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.148.349&rep=rep1&type=pdf) -- **Full Circle Magazine**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/issue65_en.html)might be slow / [MediaFire](http://www.mediafire.com/view/?6hxmt94k2vppnpb) / [Original](http://dl.fullcirclemagazine.org/issue65_en.pdf) -- **Chinese**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/chn.html) / [MediaFire](http://www.mediafire.com/view/?6550ldag9w0uuq3) / [Original](http://files.cnblogs.com/phphuaibei/git%E6%90%AD%E5%BB%BA.pdf) +- **Typography** (LaTeX): [HTML](http://coolwanglu.github.com/pdf2htmlEX/demo/geneve.html) / [PDF](https://github.com/raphink/geneve_1564/raw/master/geneve_1564.pdf) +- **Cheat Sheet** (math formulas): [HTML](http://coolwanglu.github.com/pdf2htmlEX/demo/cheat.html) / [PDF](http://www.tug.org/texshowcase/cheat.pdf) +- **Scientific Paper** (text and figures): [HTML](http://coolwanglu.github.com/pdf2htmlEX/demo/demo.html) / [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.148.349&rep=rep1&type=pdf) +- **Full Circle Magazine** (read while downloading): [HTML](http://coolwanglu.github.com/pdf2htmlEX/demo/issue65_en.html) / [PDF](http://dl.fullcirclemagazine.org/issue65_en.pdf) +- **Git Manual** (CJK support): [HTML](http://coolwanglu.github.com/pdf2htmlEX/demo/chn.html) / [PDF](http://files.cnblogs.com/phphuaibei/git%E6%90%AD%E5%BB%BA.pdf) - [Try your own files](https://github.com/coolwanglu/pdf2htmlEX/wiki/UploadDemo) [Browser requirements](https://github.com/coolwanglu/pdf2htmlEX/wiki/Browser-Requirements) diff --git a/TODO b/TODO index 9fd4604..8eb6374 100644 --- a/TODO +++ b/TODO @@ -8,6 +8,8 @@ - show hints about possible useful parameters - optimization levels - don't dump image when it is empty + - spinning icon for dynamic page loading + - fix negative word-spacing for IE == Future: == diff --git a/src/HTMLRenderer/font.cc b/src/HTMLRenderer/font.cc index ccd74ce..f13fac6 100644 --- a/src/HTMLRenderer/font.cc +++ b/src/HTMLRenderer/font.cc @@ -493,6 +493,19 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo } } + if(info.space_width == 0) + { + /* + * Internet Explorer will ignore `word-spacing` if + * the width of the 'space' glyph is 0 + * + * usually the em_size is 1000 or 2048, + * and space_width==0 often means no spaces are used in the PDF + * so setting it to be 1 should be safe + */ + info.space_width = 1; + } + if(ctu) ctu->decRefCnt(); } diff --git a/src/util/ffw.c b/src/util/ffw.c index 1be092c..4a2d679 100644 --- a/src/util/ffw.c +++ b/src/util/ffw.c @@ -267,7 +267,11 @@ void ffw_cidflatten(void) void ffw_add_empty_char(int32_t unicode, int width) { SplineChar * sc = SFMakeChar(cur_fv->sf, cur_fv->map, cur_fv->map->enccount); - SCSetMetaData(sc, sc->name, unicode, sc->comment); + char buffer[400]; + SCSetMetaData(sc, + strcopy(StdGlyphName(buffer, unicode, + cur_fv->sf->uni_interp, cur_fv->sf->for_new_glyphs)), + unicode, sc->comment); SCSynchronizeWidth(sc, width, sc->width, cur_fv); }