1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-03 08:38:39 +00:00

Merge branch 'master' of github.com:coolwanglu/pdf2htmlEX

This commit is contained in:
Lu Wang 2013-05-05 01:43:15 +08:00
commit 2c3f65b2eb
4 changed files with 25 additions and 6 deletions

View File

@ -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)<sup>might be slow</sup> / [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)

2
TODO
View File

@ -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: ==

View File

@ -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();
}

View File

@ -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);
}