mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
Merge branch 'devv' of github.com:coolwanglu/pdf2htmlEX into devv
This commit is contained in:
commit
1a304c72c3
@ -36,7 +36,7 @@ const std::string HTML_HEAD = "<!DOCTYPE html>\n\
|
||||
}\
|
||||
.l > .w {\
|
||||
display:inline-block;\
|
||||
visibility:hidden;\
|
||||
font-family: monospace;\
|
||||
}\
|
||||
::selection{\
|
||||
background: rgba(168,209,255,0.5);\
|
||||
|
@ -957,14 +957,17 @@ void HTMLRenderer::check_state_change(GfxState * state)
|
||||
|
||||
if(need_rescale_font)
|
||||
{
|
||||
draw_scale = std::sqrt(cur_ctm[2] * cur_ctm[2] + cur_ctm[3] * cur_ctm[3]);
|
||||
double new_draw_ctm[6];
|
||||
memcpy(new_draw_ctm, cur_ctm, sizeof(new_draw_ctm));
|
||||
|
||||
draw_scale = std::sqrt(new_draw_ctm[2] * new_draw_ctm[2] + new_draw_ctm[3] * new_draw_ctm[3]);
|
||||
|
||||
double new_draw_font_size = cur_font_size;
|
||||
if(_is_positive(draw_scale))
|
||||
{
|
||||
new_draw_font_size *= draw_scale;
|
||||
for(int i = 0; i < 4; ++i)
|
||||
cur_ctm[i] /= draw_scale;
|
||||
new_draw_ctm[i] /= draw_scale;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -977,9 +980,9 @@ void HTMLRenderer::check_state_change(GfxState * state)
|
||||
cur_fs_id = install_font_size(draw_font_size);
|
||||
close_line = true;
|
||||
}
|
||||
if(!(_tm_equal(cur_ctm, draw_ctm)))
|
||||
if(!(_tm_equal(new_draw_ctm, draw_ctm)))
|
||||
{
|
||||
memcpy(draw_ctm, cur_ctm, sizeof(draw_ctm));
|
||||
memcpy(draw_ctm, new_draw_ctm, sizeof(draw_ctm));
|
||||
cur_tm_id = install_transform_matrix(draw_ctm);
|
||||
close_line = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user