1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-04 17:18:40 +00:00

reinitialize vertical_align in check_state

This commit is contained in:
Lu Wang 2013-05-03 15:19:09 +08:00
parent 2b96c9d7d5
commit fe4aca9faf
3 changed files with 11 additions and 2 deletions

View File

@ -203,6 +203,12 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
const char * used_map = nullptr;
info.em_size = ffw_get_em_size();
if(param.debug)
{
cerr << "Em size: " << info.em_size << endl;
}
info.space_width = 0;
if(!font->isCIDFont())

View File

@ -369,6 +369,11 @@ void HTMLRenderer::check_state_change(GfxState * state)
new_line_state = max<NewLineState>(new_line_state, NLS_NEWLINE);
}
}
else
{
// no vertical shift if no need to check position
cur_text_state.vertical_align = 0;
}
// letter space
// depends: draw_text_scale

View File

@ -121,8 +121,6 @@ void HTMLTextLine::dump_text(ostream & out)
{
while(stack.back() != *iter)
{
state_iter1->vertical_align += stack.back()->vertical_align;
stack.back()->end(out);
stack.pop_back();
}