diff --git a/TODO b/TODO index ddf5dc1..aca4035 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,6 @@ +issue_63 on FF +vertical position of non-embeded + option to embed local matched fonts for non-embedded ones fake space detection diff --git a/src/HTMLRenderer/install.cc b/src/HTMLRenderer/install.cc index 0096845..cc3e4de 100644 --- a/src/HTMLRenderer/install.cc +++ b/src/HTMLRenderer/install.cc @@ -255,6 +255,17 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const string & suffix, if(param->single_html) add_tmp_file(fn+(param->font_suffix)); + /* + * [Win|Typo|HHead][Ascent|Descent] + * Firefox & Chrome interprets the values in different ways + * Trying to unify them + * + * .pfa does not have such mess, convert to it and back + */ + add_tmp_file(fn+"_.pfa"); + script_fout << format("Generate(%1%)") % (tmp_dir / (fn+"_.pfa")) << endl; + script_fout << "Close()" << endl; + script_fout << format("Open(%1%, 1)") % (tmp_dir / (fn+"_.pfa")) << endl; script_fout << format("Generate(%1%)") % dest << endl; script_fout << "Close()" << endl; script_fout << format("Open(%1%, 1)") % dest << endl; @@ -267,11 +278,6 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const string & suffix, } } - - /* - * Firefox & Chrome interprets the values in different ways - * Trying to unify them - */ script_fout << "a=GetOS2Value(\"TypoAscent\")" << endl; script_fout << "d=GetOS2Value(\"TypoDescent\")" << endl; script_fout << "SetOS2Value(\"TypoAscent\", 0)" << endl; diff --git a/src/HTMLRenderer/state.cc b/src/HTMLRenderer/state.cc index 51b7132..ec6a484 100644 --- a/src/HTMLRenderer/state.cc +++ b/src/HTMLRenderer/state.cc @@ -380,12 +380,11 @@ void HTMLRenderer::close_line() return; // TODO class for height - html_fout << format("
") + html_fout << format("
") % line_x % line_y % line_tm_id % line_ascent - % (line_ascent * 2) // TODO: why? ; html_fout << line_buf.rdbuf(); line_buf.str("");