1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-21 20:50:07 +00:00

working on tounicode

This commit is contained in:
Lu Wang 2012-09-20 23:40:44 +08:00
parent 8d941355a2
commit 3c32041adf
4 changed files with 16 additions and 4 deletions

8
TODO
View File

@ -2,6 +2,8 @@ remove intermediate save for asc/des
bug found in baidu(ubuntu...), bug_chn
precise link dest
option for tounicode-map
get unicode from charname using fontforge (test with 'Font' croc.pdf)
also for CID Type 0
@ -9,13 +11,14 @@ also for CID Type 0
round coordinate and check if it'll be faster
argument auto-completion
use absolute positioning for long whitespace
add fallback font for ' ', or create glyph for it
rename single-html -> embed-font/image/css ...
argument auto-completion
==Future==
use absolute positioning for long whitespace
color invert
detect duplicate base fonts when embedding
disable selection if we know unicode is wrong
@ -23,6 +26,5 @@ combine lines (unwarp)
Printing
multiple charcode mapped to a same glyph
check if we can add information to the font, and let browsers show ligatures automatically
custom html/css dir
native support for image
native support for draw

View File

@ -173,7 +173,10 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
for(auto iter = suffix.begin(); iter != suffix.end(); ++iter)
*iter = tolower(*iter);
info.use_tounicode = (is_truetype_suffix(suffix) || (param->tounicode > 0));
/*
* if parm->tounicode is 0, try the provided tounicode map first
*/
info.use_tounicode = (is_truetype_suffix(suffix) || (param->tounicode >= 0));
info.has_space = false;
const char * used_map = nullptr;

View File

@ -303,3 +303,8 @@ void ffw_set_widths(int * width_list, int mapping_len)
sc->width = width_list[i];
}
}
void ffw_auto_hint(void)
{
FVAutoHint(cur_fv);
}

View File

@ -35,6 +35,8 @@ void ffw_metric(double * ascent, double * descent, int * em_size);
void ffw_set_widths(int * width_list, int mapping_len);
void ffw_auto_hint(void);
#ifdef __cplusplus
}
}