1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

restrict letter space optimization

This commit is contained in:
Lu Wang 2013-04-05 22:44:49 +08:00
parent d238b78e07
commit 86961b2a80

View File

@ -351,7 +351,7 @@ void HTMLRenderer::TextLineBuffer::optimize()
}
// negative letter space may cause problems
if(!is_positive(state_iter1->letter_space + most_used_width))
if((max_count <= text_count / 2) || (!is_positive(state_iter1->letter_space + most_used_width)))
{
// the old value is the best
// just copy old offsets