diff --git a/TODO b/TODO index 6ca7726..fb2960d 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/src/HTMLRenderer/text.cc b/src/HTMLRenderer/text.cc index f01bb26..9728f91 100644 --- a/src/HTMLRenderer/text.cc +++ b/src/HTMLRenderer/text.cc @@ -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; diff --git a/src/ffw.c b/src/ffw.c index 371bee0..678ed78 100644 --- a/src/ffw.c +++ b/src/ffw.c @@ -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); +} diff --git a/src/include/ffw.h b/src/include/ffw.h index 4dd9248..84c907f 100644 --- a/src/include/ffw.h +++ b/src/include/ffw.h @@ -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 } }