mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
disable font change using span; adjust hightlight color
This commit is contained in:
parent
f43b14dee4
commit
4c20fc6eee
@ -25,10 +25,10 @@
|
|||||||
color:transparent;
|
color:transparent;
|
||||||
}
|
}
|
||||||
::selection{
|
::selection{
|
||||||
background: rgba(168,209,255,0.5);
|
background: rgba(127,255,255,1);
|
||||||
}
|
}
|
||||||
::-moz-selection{
|
::-moz-selection{
|
||||||
background: rgba(168,209,255,0.5);
|
background: rgba(127,255,255,1);
|
||||||
}
|
}
|
||||||
.i {
|
.i {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
|
@ -114,7 +114,7 @@ void HTMLRenderer::check_state_change(GfxState * state)
|
|||||||
|
|
||||||
if(!(new_fn_id == cur_fn_id))
|
if(!(new_fn_id == cur_fn_id))
|
||||||
{
|
{
|
||||||
new_line_status = max(new_line_status, LineStatus::SPAN);
|
new_line_status = max(new_line_status, LineStatus::DIV);
|
||||||
cur_fn_id = new_fn_id;
|
cur_fn_id = new_fn_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ void HTMLRenderer::check_state_change(GfxState * state)
|
|||||||
double new_draw_ctm[6];
|
double new_draw_ctm[6];
|
||||||
memcpy(new_draw_ctm, cur_ctm, sizeof(new_draw_ctm));
|
memcpy(new_draw_ctm, cur_ctm, sizeof(new_draw_ctm));
|
||||||
|
|
||||||
draw_scale = sqrt(new_draw_ctm[2] * new_draw_ctm[2] + new_draw_ctm[3] * new_draw_ctm[3]);
|
draw_scale = 10*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;
|
double new_draw_font_size = cur_font_size;
|
||||||
if(_is_positive(draw_scale))
|
if(_is_positive(draw_scale))
|
||||||
@ -173,7 +173,7 @@ void HTMLRenderer::check_state_change(GfxState * state)
|
|||||||
|
|
||||||
if(!(_equal(new_draw_font_size, draw_font_size)))
|
if(!(_equal(new_draw_font_size, draw_font_size)))
|
||||||
{
|
{
|
||||||
new_line_status = max(new_line_status, LineStatus::SPAN);
|
new_line_status = max(new_line_status, LineStatus::DIV);
|
||||||
draw_font_size = new_draw_font_size;
|
draw_font_size = new_draw_font_size;
|
||||||
cur_fs_id = install_font_size(draw_font_size);
|
cur_fs_id = install_font_size(draw_font_size);
|
||||||
}
|
}
|
||||||
@ -318,16 +318,15 @@ void HTMLRenderer::prepare_line(GfxState * state)
|
|||||||
// "t0" is the id_matrix
|
// "t0" is the id_matrix
|
||||||
if(cur_tm_id != 0)
|
if(cur_tm_id != 0)
|
||||||
html_fout << format("t%|1$x| ") % cur_tm_id;
|
html_fout << format("t%|1$x| ") % cur_tm_id;
|
||||||
|
|
||||||
|
html_fout << format("f%|1$x| s%|2$x| ") % cur_fn_id % cur_fs_id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(false && "Bad value of new_line_status");
|
assert(false && "Bad value of new_line_status");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html_fout << format("c%|1$x|") % cur_color_id;
|
||||||
// TODO: only show changed styles for <span>
|
|
||||||
html_fout << format("f%|1$x| s%|2$x| c%|3$x|") % cur_fn_id % cur_fs_id % cur_color_id;
|
|
||||||
|
|
||||||
|
|
||||||
if(cur_ls_id != 0)
|
if(cur_ls_id != 0)
|
||||||
html_fout << format(" l%|1$x|") % cur_ls_id;
|
html_fout << format(" l%|1$x|") % cur_ls_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user