mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
Added TextBoxWidget.has_split_inside_word flag
Used by coverbrowser's Text covers to choose the best font size.
This commit is contained in:
@@ -138,6 +138,9 @@ function TextBoxWidget:_splitCharWidthList()
|
||||
-- either a very long english word ocuppying more than one line,
|
||||
-- or the excessive char is itself splittable:
|
||||
-- we let that excessive char for next line
|
||||
if adjusted_idx == offset then -- let the fact a long word was splitted be known
|
||||
self.has_split_inside_word = true
|
||||
end
|
||||
cur_line_text = table.concat(self.charlist, "", offset, idx - 1)
|
||||
cur_line_width = cur_line_width - self.char_width_list[idx].width
|
||||
elseif c == " " then
|
||||
|
||||
Reference in New Issue
Block a user