mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bump crengine: word spacing and hyphenation tweaks
Includes: - New option to tune word spacing: space width scale percent - Text: look for hyphenation in more words if needed - CSS: fix "hyphens:none" should override inherited "hyphens:auto" - getHtml(): grab dir= and lang= attributes from upper nodes Replace our Word Gap/Space condensing toggle/setting with a new Word Spacing toggle/setting, made of 2 values: - 1st number scales the normal width of spaces in all font (100% uses the font space width untouched) - 2nd number applies after the 1st has been applied, and tells how much these spaces can additionally be condensed to make more text fit on a line.
This commit is contained in:
@@ -184,15 +184,15 @@ describe("Readerrolling module", function()
|
||||
|
||||
describe("test changing word gap - space condensing", function()
|
||||
it("should show pages for different word gap", function()
|
||||
readerui.document:setSpaceCondensing(100)
|
||||
readerui.document:setWordSpacing({100, 90})
|
||||
readerui:handleEvent(Event:new("ChangeScreenMode", "portrait"))
|
||||
assert.are.same(252, readerui.document:getPageCount())
|
||||
readerui.document:setSpaceCondensing(75)
|
||||
readerui.document:setWordSpacing({95, 75})
|
||||
readerui:handleEvent(Event:new("ChangeScreenMode", "portrait"))
|
||||
assert.are.same(248, readerui.document:getPageCount())
|
||||
readerui.document:setSpaceCondensing(50)
|
||||
assert.are.same(241, readerui.document:getPageCount())
|
||||
readerui.document:setWordSpacing({75, 50})
|
||||
readerui:handleEvent(Event:new("ChangeScreenMode", "portrait"))
|
||||
assert.are.same(235, readerui.document:getPageCount())
|
||||
assert.are.same(231, readerui.document:getPageCount())
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user