mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
restrict letter space optimization
This commit is contained in:
parent
4f34a3ed84
commit
add45cde74
@ -189,7 +189,9 @@ For some versions of Firefox, however, there will be a problem when the font siz
|
||||
|
||||
.TP
|
||||
.B --space-as-offset <0|1> (Default: 1)
|
||||
If set to 1, space characters will be treated as offsets, which allows a better optimization. Turn it off if space characters are not displayed correctly.
|
||||
If set to 1, space characters will be treated as offsets, which allows a better optimization.
|
||||
|
||||
This option may cause problems for PDF files with bad encodings.
|
||||
|
||||
.TP
|
||||
.B --tounicode <-1|0|1> (Default: 0)
|
||||
|
@ -338,7 +338,8 @@ void HTMLRenderer::TextLineBuffer::optimize()
|
||||
}
|
||||
|
||||
// now we would like to adjust letter space to most_used width
|
||||
if(max_count <= text_count - offset_count)
|
||||
// we shall apply the optimization only when it can significantly reduce the number of elements
|
||||
if(max_count <= text_count / 2)
|
||||
{
|
||||
// the old value is the best
|
||||
// just copy copy offsets
|
||||
|
Loading…
Reference in New Issue
Block a user