bump base: crengine, freetype, libjpeg-turbo (#3928)
Includes: - [build] FreeType: bump to 2.9.1 - [build] bump libjpeg-turbo to 1.5.3 - bump crengine: - Fix CSS selector specificity computation - [fix] crengine/src/lvfntman.cpp: improve letter_spacing limit - [fix] crengine/src/lvxml.cpp: add all empty HTML elements - html head styles: fix styles not being applied - Hyphenation: increase MAX_PATTERN_SIZE from 16 to 35 - html documents: proper handling of <BR> tags - Allows requesting old (broken) XML/DOM building code - cre.cpp: setStyleSheet(): accept filepath and/or css text, and added getIntProperty() and getStringProperty() credocument/readerrolling: request older XML/DOM building code for books previously opened, to not lose bookmarks and highlights (unit tests update because of new handling of consecutive BR via css pushed links down in the book)
This commit is contained in:
1 parent
4bf4578d17
commit
8b2253b3e9
4 files changed
+46
-8
No files matched your search
@@ -20,6 +20,7 @@ local CreDocument = Document:new{
|
||||
|
||||
_document = false,
|
||||
_loaded = false,
|
||||
_cre_dom_version = nil,
|
||||
|
||||
line_space_percent = 100,
|
||||
default_font = G_reader_settings:readSetting("cre_font") or "Noto Serif",
|
||||
@@ -120,6 +121,9 @@ function CreDocument:init()
|
||||
error(self._document) -- will contain error message
|
||||
end
|
||||
|
||||
-- get DOM engine latest version
|
||||
self._cre_dom_version = self._document:getIntProperty("crengine.dom.version")
|
||||
|
||||
-- adjust font sizes according to screen dpi
|
||||
self._document:adjustFontSizes(Screen:getDPI())
|
||||
|
||||
@@ -137,6 +141,18 @@ function CreDocument:init()
|
||||
self.info.configurable = true
|
||||
end
|
||||
|
||||
function CreDocument:getLatestDomVersion()
|
||||
return self._cre_dom_version
|
||||
end
|
||||
|
||||
function CreDocument:getOldestDomVersion()
|
||||
return 20171225 -- arbitrary day in the past
|
||||
end
|
||||
|
||||
function CreDocument:requestDomVersion(version)
|
||||
self._document:setIntProperty("crengine.dom.version", version)
|
||||
end
|
||||
|
||||
function CreDocument:loadDocument(full_document)
|
||||
if not self._loaded then
|
||||
local only_metadata = full_document == false
|
||||
|
||||
Reference in new issue
Block a user