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:
poire-z
2019-11-28 22:39:06 +01:00
parent e4dd1826fa
commit 5541d5f5d3
12 changed files with 128 additions and 72 deletions

View File

@@ -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)