mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Allow toggling use of additional fallback fonts (#6095)
This commit is contained in:
@@ -639,6 +639,13 @@ function CreDocument:setupFallbackFontFaces()
|
||||
seen_fonts[font_name] = true
|
||||
end
|
||||
end
|
||||
if G_reader_settings:isFalse("additional_fallback_fonts") then
|
||||
-- Keep the first fallback font (user set or first from self.fallback_fonts),
|
||||
-- as crengine won't reset its current set when provided with an empty string
|
||||
for i=#fallbacks, 2, -1 do
|
||||
table.remove(fallbacks, i)
|
||||
end
|
||||
end
|
||||
-- We use '|' as the delimiter (which is less likely to be found in font
|
||||
-- names than ',' or ';', without the need to have to use quotes.
|
||||
local s_fallbacks = table.concat(fallbacks, "|")
|
||||
|
||||
Reference in New Issue
Block a user