1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-05 09:38:40 +00:00
This commit is contained in:
Lu Wang 2012-09-07 01:33:00 +08:00
parent 45b54d18c4
commit 3b8452e717
3 changed files with 10 additions and 4 deletions

View File

@ -79,6 +79,10 @@ The following projects have been consulted for pdf2htmlEX:
## Contact
Suggestions and questions are welcome.
Please read the FAQ(https://github.com/coolwanglu/pdf2htmlEX/wiki/FAQ) beforehand.
* Lu Wang <coolwanglu@gmail.com>
### Special Thanks

2
TODO
View File

@ -2,8 +2,6 @@ disable annotation
valgrind
re-encoded only used glyphs
detect duplicate base fonts when embedding
take care of spaces (simulate by <span>)

View File

@ -175,8 +175,11 @@ void HTMLRenderer::embed_font(const path & filepath, GfxFont * font, FontInfo &
info.use_tounicode = ((suffix == ".ttf") || (font->isCIDFont()) || (param->always_apply_tounicode));
if(!get_metric_only)
{
const char * used_map = font_preprocessor.get_code_map(hash_ref(font->getID()));
/*
* Step 1
* dump the font file directly from the font descriptor and put the glyphs into the correct slots
@ -217,8 +220,6 @@ void HTMLRenderer::embed_font(const path & filepath, GfxFont * font, FontInfo &
memset(cur_mapping2, 0, 256 * sizeof(char*));
const char * used_map = font_preprocessor.get_code_map(hash_ref(font->getID()));
for(int i = 0; i < 256; ++i)
{
if(!used_map[i]) continue;
@ -293,6 +294,9 @@ void HTMLRenderer::embed_font(const path & filepath, GfxFont * font, FontInfo &
int max_key = maxcode;
for(int i = 0; i <= maxcode; ++i)
{
if(!used_map[i])
continue;
if((suffix != ".ttf") && (font_8bit != nullptr) && (font_8bit->getCharName(i) == nullptr))
{
continue;