mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
solved a dpi bug
This commit is contained in:
parent
cc92150784
commit
5e4677c1e8
@ -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