mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
unify asc/dsc for FF/Chrome
This commit is contained in:
parent
6916ffb91b
commit
c99f725c72
3
TODO
3
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
|
||||
|
@ -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;
|
||||
|
@ -380,12 +380,11 @@ void HTMLRenderer::close_line()
|
||||
return;
|
||||
|
||||
// TODO class for height
|
||||
html_fout << format("<div style=\"left:%1%px;bottom:%2%px;height:%4%px;line-height:%5%px;\" class=\"l t%|3$x|\">")
|
||||
html_fout << format("<div style=\"left:%1%px;bottom:%2%px;height:%4%px;\" class=\"l t%|3$x|\">")
|
||||
% line_x
|
||||
% line_y
|
||||
% line_tm_id
|
||||
% line_ascent
|
||||
% (line_ascent * 2) // TODO: why?
|
||||
;
|
||||
html_fout << line_buf.rdbuf();
|
||||
line_buf.str("");
|
||||
|
Loading…
Reference in New Issue
Block a user