bump crengine: sync with upstream, new hyphenation languages (#6746)

Includes:
- (Upstream) various unimpacting changes to keep in sync
- (Upstream) Fix issues with legacy text rendering
- (Upstream) FB3/DocX/ODT: get lang and description metadata
- (Upstream) remove some global settings, make them per-doc
- TextLang, hyphenation: add Armenian, Friulian, Piedmontese,
  Romansh, Zulu and Brazilian Portuguese.

Also make cre the prefered engine for .xhtml (over MuPDF)
and for .xml (which might be HTML).
reviewable/pr6608/r3^2
poire-z 4 years ago committed by GitHub
parent 8a41ed9166
commit 8b886e5922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit df85f11880b7469020bafe525bc74ec1536db6cb
Subproject commit fc7946516b6c80394458a037af2dcec7caa3cfb6

@ -39,6 +39,7 @@ local HYPH_DICT_NAME_TO_LANG_NAME_TAG = {
-- Update them when language tweaks and features are added to crengine/src/textlang.cpp
local LANGUAGES = {
-- lang-tag aliases features menu title hyphenation file name
{ "hy", {"arm", "hye", "hyw"}, "H ", _("Armenian"), "Armenian.pattern" },
{ "eu", {}, "H ", _("Basque"), "Basque.pattern" },
{ "bg", {"bul"}, "H ", _("Bulgarian"), "Bulgarian.pattern" },
{ "ca", {"cat"}, "H ", _("Catalan"), "Catalan.pattern" },
@ -54,6 +55,7 @@ local LANGUAGES = {
{ "et", {"est"}, "H ", _("Estonian"), "Estonian.pattern" },
{ "fi", {"fin"}, "H ", _("Finnish"), "Finnish.pattern" },
{ "fr", {"fra", "fre"}, "Hb ", _("French"), "French.pattern" },
{ "fur", {}, "H ", _("Friulian"), "Friulian.pattern" },
{ "gl", {"glg"}, "H ", _("Galician"), "Galician.pattern" },
{ "ka", {}, "H ", _("Georgian"), "Georgian.pattern" },
{ "de", {"deu"}, "Hb ", _("German"), "German.pattern" },
@ -70,7 +72,10 @@ local LANGUAGES = {
{ "no", {"nor"}, "H ", _("Norwegian"), "Norwegian.pattern" },
{ "oc", {"oci"}, "H ", _("Occitan"), "Occitan.pattern" },
{ "pl", {"pol"}, "HB ", _("Polish"), "Polish.pattern" },
{ "pms", {}, "H ", _("Piedmontese"), "Piedmontese.pattern" },
{ "pt-BR", {}, "HB ", _("Portuguese (BR)"), "Portuguese_BR.pattern" },
{ "pt", {"por"}, "HB ", _("Portuguese"), "Portuguese.pattern" },
{ "rm", {"roh"}, "H ", _("Romansh"), "Romansh.pattern" },
{ "ro", {"ron"}, "H ", _("Romanian"), "Romanian.pattern" },
{ "ru-GB", {}, "Hb ", _("Russian + English (UK)"), "Russian_EnGB.pattern" },
{ "ru-US", {}, "Hb ", _("Russian + English (US)"), "Russian_EnUS.pattern" },
@ -83,6 +88,7 @@ local LANGUAGES = {
{ "tr", {"tur"}, "H ", _("Turkish"), "Turkish.pattern" },
{ "uk", {"ukr"}, "H ", _("Ukrainian"), "Ukrainian.pattern" },
{ "cy", {"cym"}, "H ", _("Welsh"), "Welsh.pattern" },
{ "zu", {"zul"}, "H ", _("Zulu"), "Zulu.pattern" },
}
local DEFAULT_LANG_TAG = "en-US" -- English_US.pattern is loaded by default in crengine

@ -178,7 +178,7 @@ end
function CreDocument:requestDomVersion(version)
logger.dbg("CreDocument: requesting DOM version:", version)
cre.requestDomVersion(version)
self._document:setIntProperty("crengine.render.requested_dom_version", version)
end
function CreDocument:getDocumentFormat()
@ -1041,7 +1041,8 @@ function CreDocument:register(registry)
registry:addProvider("txt", "text/plain", self, 90)
registry:addProvider("txt.zip", "application/zip", self, 90)
registry:addProvider("rtf", "application/rtf", self, 90)
registry:addProvider("xhtml", "application/xhtml+xml", self, 90)
registry:addProvider("xhtml", "application/xhtml+xml", self, 100)
registry:addProvider("xml", "application/xml", self, 90)
registry:addProvider("zip", "application/zip", self, 10)
-- Scripts that we allow running in the FM (c.f., Device:canExecuteScript)
registry:addProvider("sh", "application/x-shellscript", self, 90)

@ -298,7 +298,7 @@ function PdfDocument:register(registry)
registry:addProvider("html", "text/html", self, 90)
registry:addProvider("pdf", "application/pdf", self, 100)
registry:addProvider("tar", "application/x-tar", self, 10)
registry:addProvider("xhtml", "application/xhtml+xml", self, 100)
registry:addProvider("xhtml", "application/xhtml+xml", self, 90)
registry:addProvider("xml", "application/xml", self, 10)
registry:addProvider("xps", "application/oxps", self, 100)
registry:addProvider("zip", "application/zip", self, 20)

Loading…
Cancel
Save