From 7de022a61742f42224a046b604202e3a8e150ed7 Mon Sep 17 00:00:00 2001 From: poire-z Date: Thu, 17 Oct 2019 15:17:35 +0200 Subject: [PATCH] bump crengine: adds DOCX and FB3 support (#5498) Includes: - (Upstream) Unified cache for chars and glyph's indexes - (Upstream) Glyph caching: optional use of hash table instead of a linked list - (Upstream) Adds docx and fb3 support - Update hardcoded elements list and stylesheets - DocX: build a HTML DOM instead of a FB2 DOM - Text: allow wrap after '/' and '-' - Text: with Harfbuzz, split measurement on text node change - Clear fonts on load and re-rendering --- base | 2 +- frontend/document/credocument.lua | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base b/base index fa35ba185..d9a685c68 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit fa35ba1852395d7db8b7365ea44d9b83b11b610a +Subproject commit d9a685c6817d073a9fc0cd231e567a998250a9c6 diff --git a/frontend/document/credocument.lua b/frontend/document/credocument.lua index 1c966b95a..93c7ff7bd 100644 --- a/frontend/document/credocument.lua +++ b/frontend/document/credocument.lua @@ -111,7 +111,7 @@ function CreDocument:init() -- same way, and are kept as-is for when a previously opened document -- requests one of them. self.default_css = "./data/epub.css" - if file_type == "fb2" then + if file_type == "fb2" or file_type == "fb3" then self.default_css = "./data/fb2.css" end @@ -850,9 +850,11 @@ function CreDocument:register(registry) registry:addProvider("azw", "application/vnd.amazon.mobi8-ebook", self, 90) registry:addProvider("chm", "application/vnd.ms-htmlhelp", self, 90) registry:addProvider("doc", "application/msword", self, 90) + registry:addProvider("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", self, 90) registry:addProvider("epub", "application/epub+zip", self, 100) registry:addProvider("fb2", "application/fb2", self, 90) registry:addProvider("fb2.zip", "application/zip", self, 90) + registry:addProvider("fb3", "application/fb3", self, 90) registry:addProvider("htm", "text/html", self, 100) registry:addProvider("html", "text/html", self, 100) registry:addProvider("htm.zip", "application/zip", self, 100)