diff --git a/base b/base index 9f3f00932..7b5568a3c 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 9f3f0093267b75da1d3772a006d0138124544fc2 +Subproject commit 7b5568a3c44179fbcedafa22ee03701171539727 diff --git a/frontend/apps/reader/modules/readerhighlight.lua b/frontend/apps/reader/modules/readerhighlight.lua index c9ba407d5..8dc63bdd2 100644 --- a/frontend/apps/reader/modules/readerhighlight.lua +++ b/frontend/apps/reader/modules/readerhighlight.lua @@ -828,21 +828,21 @@ function ReaderHighlight:viewSelectionHTML(debug_view) if self.selected_text and self.selected_text.pos0 and self.selected_text.pos1 then -- For available flags, see the "#define WRITENODEEX_*" in crengine/src/lvtinydom.cpp -- Start with valid and classic displayed HTML (with only block nodes indented), - -- including styles found in , and linked CSS files content. - local html_flags = 0x6030 + -- including styles found in , linked CSS files content, and misc info. + local html_flags = 0x6830 if not debug_view then debug_view = 0 end if debug_view == 1 then -- Each node on a line, with markers and numbers of skipped chars and siblings shown, -- with possibly invalid HTML (text nodes not escaped) - html_flags = 0x635A + html_flags = 0x6B5A elseif debug_view == 2 then -- Additionally see rendering methods of each node - html_flags = 0x675A + html_flags = 0x6F5A elseif debug_view == 3 then -- Or additionally see unicode codepoint of each char - html_flags = 0x635E + html_flags = 0x6B5E end local html, css_files = self.ui.document:getHTMLFromXPointers(self.selected_text.pos0, self.selected_text.pos1, html_flags, true) diff --git a/frontend/ui/data/css_tweaks.lua b/frontend/ui/data/css_tweaks.lua index 2dc7224ad..deebb9c44 100644 --- a/frontend/ui/data/css_tweaks.lua +++ b/frontend/ui/data/css_tweaks.lua @@ -281,13 +281,26 @@ DocFragment { }, }, { - id = "hyphenate_all_auto"; - title = _("Allow hyphenation on all text"), - description = _("Allow hyphenation on all text (except headings), in case the publisher has disabled it."), - css = [[ + title = _("Hyphenation and ligatures"), + { + id = "hyphenate_all_auto"; + title = _("Allow hyphenation on all text"), + description = _("Allow hyphenation on all text (except headings), in case the publisher has disabled it."), + css = [[ * { hyphens: auto !important; } h1, h2, h3, h4, h5, h6 { hyphens: none !important; } - ]], + ]], + }, + { + id = "ligature_all_no_common_ligature"; + title = _("Disable common ligatures"), + description = _("Disable common ligatures, which are enabled by default in 'best' kerning mode."), + -- We don't use !important, as this would stop other font-variant properties + -- from being applied + css = [[ +* { font-variant: no-common-ligatures; } + ]], + }, separator = true, }, { @@ -454,6 +467,7 @@ body, h1, h2, h3, h4, h5, h6, div, li, td, th { text-indent: 0 !important; } title = _("Full-width tables"), description = _("Make table expand to the full width of the page. (Tables with small content now use only the width needed to display that content. This restores the previous behavior.)"), css = [[table { width: 100% !important; }]], + priority = 2, -- Override next one }, { id = "table_td_width_auto"; @@ -790,6 +804,15 @@ switch > case { display: inline; } switch > default { display: none; } ]], }, + { + id = "no_pseudo_element_before_after"; + title = _("Disable before/after pseudo elements"), + description = _([[Disable generated text from ::before and ::after pseudo elements, usually used to add cosmetic text around some content.]]), + css = [[ +*::before { display: none !important; } +*::after { display: none !important; } + ]], + }, { id = "pure_black_and_white"; title = _("Pure black and white"),