mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-10-05 19:41:40 +00:00
reinitialize vertical_align in check_state
This commit is contained in:
parent
2b96c9d7d5
commit
fe4aca9faf
@ -203,6 +203,12 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
|
|||||||
const char * used_map = nullptr;
|
const char * used_map = nullptr;
|
||||||
|
|
||||||
info.em_size = ffw_get_em_size();
|
info.em_size = ffw_get_em_size();
|
||||||
|
|
||||||
|
if(param.debug)
|
||||||
|
{
|
||||||
|
cerr << "Em size: " << info.em_size << endl;
|
||||||
|
}
|
||||||
|
|
||||||
info.space_width = 0;
|
info.space_width = 0;
|
||||||
|
|
||||||
if(!font->isCIDFont())
|
if(!font->isCIDFont())
|
||||||
|
@ -369,6 +369,11 @@ void HTMLRenderer::check_state_change(GfxState * state)
|
|||||||
new_line_state = max<NewLineState>(new_line_state, NLS_NEWLINE);
|
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
|
// letter space
|
||||||
// depends: draw_text_scale
|
// depends: draw_text_scale
|
||||||
|
@ -121,8 +121,6 @@ void HTMLTextLine::dump_text(ostream & out)
|
|||||||
{
|
{
|
||||||
while(stack.back() != *iter)
|
while(stack.back() != *iter)
|
||||||
{
|
{
|
||||||
state_iter1->vertical_align += stack.back()->vertical_align;
|
|
||||||
|
|
||||||
stack.back()->end(out);
|
stack.back()->end(out);
|
||||||
stack.pop_back();
|
stack.pop_back();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user