From 4740ab1fdca2bfcf24e4d5b31a4e9062346da034 Mon Sep 17 00:00:00 2001 From: poire-z Date: Fri, 22 Nov 2019 23:54:34 +0100 Subject: [PATCH] bump crengine: round FT metrics, split text drawing by script (#5628) Includes: - Fonts: round FT metrics instead of floor'ing them - Fonts: switch to no hinting when native hinting fails - Fonts: fix issue with Harfbuzz fallback font drawing - Text: split measuring and word drawing by unicode script - Page splitting: fix small memory leak - Fix "background-color: black" ignored on inline elements - Fix decoding of recent MOBI files - Hardcoded elements list: add base/xtext.cpp: small cleanup, no logic change --- base | 2 +- spec/unit/readerfooter_spec.lua | 4 ++-- spec/unit/readerrolling_spec.lua | 6 +++--- spec/unit/readertoc_spec.lua | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/base b/base index 024e1a49b..eef8334f5 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 024e1a49b43c254b0831ef05a3e0d20d12caa0b0 +Subproject commit eef8334f508149b830aba5f3e84bd7250f7c6016 diff --git a/spec/unit/readerfooter_spec.lua b/spec/unit/readerfooter_spec.lua index d0910cdef..b57ef44dd 100644 --- a/spec/unit/readerfooter_spec.lua +++ b/spec/unit/readerfooter_spec.lua @@ -317,8 +317,8 @@ describe("Readerfooter module", function() assert.are.same(362, footer.text_width) footer:onPageUpdate(100) - assert.are.same(194, footer.progress_bar.width) - assert.are.same(386, footer.text_width) + assert.are.same(186, footer.progress_bar.width) + assert.are.same(394, footer.text_width) end) it("should support chapter markers", function() diff --git a/spec/unit/readerrolling_spec.lua b/spec/unit/readerrolling_spec.lua index aff0ae458..eab0f1403 100644 --- a/spec/unit/readerrolling_spec.lua +++ b/spec/unit/readerrolling_spec.lua @@ -186,13 +186,13 @@ describe("Readerrolling module", function() it("should show pages for different word gap", function() readerui.document:setSpaceCondensing(100) readerui:handleEvent(Event:new("ChangeScreenMode", "portrait")) - assert.are.same(231, readerui.document:getPageCount()) + assert.are.same(252, readerui.document:getPageCount()) readerui.document:setSpaceCondensing(75) readerui:handleEvent(Event:new("ChangeScreenMode", "portrait")) - assert.are.same(229, readerui.document:getPageCount()) + assert.are.same(248, readerui.document:getPageCount()) readerui.document:setSpaceCondensing(50) readerui:handleEvent(Event:new("ChangeScreenMode", "portrait")) - assert.are.same(225, readerui.document:getPageCount()) + assert.are.same(235, readerui.document:getPageCount()) end) end) diff --git a/spec/unit/readertoc_spec.lua b/spec/unit/readertoc_spec.lua index 997fda5bf..60b7ab507 100644 --- a/spec/unit/readertoc_spec.lua +++ b/spec/unit/readertoc_spec.lua @@ -25,7 +25,7 @@ describe("Readertoc module", function() title = toc:getTocTitleByPage(60) DEBUG("toc", toc.toc) assert.is.equal("SCENE V. A hall in Capulet's house.", title) - title = toc:getTocTitleByPage(177) + title = toc:getTocTitleByPage(187) assert.is.equal("SCENE I. Friar Laurence's cell.", title) end) describe("getTocTicks API", function() @@ -68,12 +68,12 @@ describe("Readertoc module", function() end) it("should get page left of chapter", function() assert.truthy(toc:getChapterPagesLeft(10, 0) > 10) - assert.truthy(toc:getChapterPagesLeft(90, 0) > 10) + assert.truthy(toc:getChapterPagesLeft(95, 0) > 10) assert.are.same(nil, toc:getChapterPagesLeft(290, 0)) end) it("should get page done of chapter", function() assert.truthy(toc:getChapterPagesDone(11, 0) < 5) - assert.truthy(toc:getChapterPagesDone(83, 0) < 5) + assert.truthy(toc:getChapterPagesDone(88, 0) < 5) assert.truthy(toc:getChapterPagesDone(290, 0) > 10) end) describe("collasible TOC", function()