mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
implement GUI dialog for setting crengine fallback font
This commit is contained in:
@@ -75,10 +75,13 @@ function RenderText:getGlyph(face, charcode, bold)
|
||||
for index, font in pairs(Font.fallbacks) do
|
||||
-- use original size before scaling by screen DPI
|
||||
local fb_face = Font:getFace(font, face.orig_size)
|
||||
if fb_face.ftface:checkGlyph(charcode) ~= 0 then
|
||||
rendered_glyph = fb_face.ftface:renderGlyph(charcode, bold)
|
||||
--DEBUG("fallback to font", font)
|
||||
break
|
||||
if fb_face ~= nil then
|
||||
-- for some characters it cannot find in Fallbacks, it will crash here
|
||||
if fb_face.ftface:checkGlyph(charcode) ~= 0 then
|
||||
rendered_glyph = fb_face.ftface:renderGlyph(charcode, bold)
|
||||
--DEBUG("fallback to font", font)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user