bump crengine: tables rendering improvements and others

bump crengine, which includes:
- Adds support for symbol fonts (local or embedded)
- Fix some issues when rendering text in constrained width
- Page splitting: fix possible missing blocks
- CSS: adds support for 'auto', ignore % for borders
- Fix right border drawing position
- Fix: adds missing properties in copystyle()
- Adds comments, erm_killed rendering method
- Adds getRenderedWidths(): get node min/max node content width
- Tables rendering: fixes and improvements
- getRenderedWidths: enable min_width to be a single CJK char
- Fix wrong text wrap avoid in some case
- epub.css: add style for 'blockquote'
- Fix rendering issue when line ends with an image

Adds a few style tweaks related to tables.

Enforce table width: 100% in Wikipedia EPUBs to keep
previous look, which feels better with the various kinds
of tables in Wikipedia pages.

Fix unit tests as juliet.epub (full of blockquotes), grew quite
a few pages with the epub.css update.
This commit is contained in:
poire-z
2018-12-05 13:01:49 +01:00
parent ed8f87f9f4
commit ea946d52d6
9 changed files with 85 additions and 45 deletions

View File

@@ -22,10 +22,10 @@ describe("Readertoc module", function()
assert.are.same(2, toc_max_depth)
end)
it("should get toc title from page", function()
title = toc:getTocTitleByPage(49)
title = toc:getTocTitleByPage(60)
DEBUG("toc", toc.toc)
assert(title == "SCENE V. A hall in Capulet's house.")
title = toc:getTocTitleByPage(143)
title = toc:getTocTitleByPage(195)
assert(title == "SCENE I. Friar Laurence's cell.")
end)
describe("getTocTicks API", function()
@@ -59,7 +59,7 @@ describe("Readertoc module", function()
it("should get page of next chapter", function()
assert.truthy(toc:getNextChapter(10, 0) > 10)
assert.truthy(toc:getNextChapter(100, 0) > 100)
assert.are.same(nil, toc:getNextChapter(200, 0))
assert.are.same(nil, toc:getNextChapter(290, 0))
end)
it("should get page of previous chapter", function()
assert.truthy(toc:getPreviousChapter(10, 0) < 10)
@@ -68,13 +68,13 @@ describe("Readertoc module", function()
end)
it("should get page left of chapter", function()
assert.truthy(toc:getChapterPagesLeft(10, 0) > 10)
assert.truthy(toc:getChapterPagesLeft(92, 0) > 10)
assert.are.same(nil, toc:getChapterPagesLeft(200, 0))
assert.truthy(toc:getChapterPagesLeft(102, 0) > 10)
assert.are.same(nil, toc:getChapterPagesLeft(290, 0))
end)
it("should get page done of chapter", function()
assert.truthy(toc:getChapterPagesDone(12, 0) < 5)
assert.truthy(toc:getChapterPagesDone(95, 0) < 5)
assert.truthy(toc:getChapterPagesDone(204, 0) > 10)
assert.truthy(toc:getChapterPagesDone(290, 0) > 10)
end)
describe("collasible TOC", function()
it("should collapse the secondary toc nodes by default", function()