mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
working on --optimize-text 3
This commit is contained in:
parent
abf5ad99aa
commit
11b488e236
2
TODO
2
TODO
@ -1,3 +1,5 @@
|
|||||||
|
save width in Textline, create new <div> in the middle
|
||||||
|
|
||||||
add async to <script>
|
add async to <script>
|
||||||
link in outline: dest-detail vs hashtag
|
link in outline: dest-detail vs hashtag
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ void HTMLRenderer::check_state_change(GfxState * state)
|
|||||||
}
|
}
|
||||||
//else no solution
|
//else no solution
|
||||||
}
|
}
|
||||||
// else force new line
|
// else: different rotation: force new line
|
||||||
|
|
||||||
if(merged)
|
if(merged)
|
||||||
{
|
{
|
||||||
|
@ -187,6 +187,8 @@ void HTMLTextLine::dump_text(ostream & out)
|
|||||||
|
|
||||||
// finally, just dump it
|
// finally, just dump it
|
||||||
if(!done)
|
if(!done)
|
||||||
|
{
|
||||||
|
if(param.optimize_text < 3)
|
||||||
{
|
{
|
||||||
long long wid = all_manager.whitespace.install(target, &actual_offset);
|
long long wid = all_manager.whitespace.install(target, &actual_offset);
|
||||||
|
|
||||||
@ -201,6 +203,15 @@ void HTMLTextLine::dump_text(ostream & out)
|
|||||||
<< ' ' << CSS::WHITESPACE_CN << wid << "\">" << (target > (threshold - EPS) ? " " : "") << "</span>";
|
<< ' ' << CSS::WHITESPACE_CN << wid << "\">" << (target > (threshold - EPS) ? " " : "") << "</span>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// aggressive optimization
|
||||||
|
double threshold = state_iter1->em_size() * (param.space_threshold);
|
||||||
|
if(target > threshold)
|
||||||
|
out << ' ';
|
||||||
|
actual_offset = target;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dx = target - actual_offset;
|
dx = target - actual_offset;
|
||||||
++ cur_offset_iter;
|
++ cur_offset_iter;
|
||||||
|
Loading…
Reference in New Issue
Block a user