remove rescaleByDPI since it's not reversible

alternatively we store the original size before scaling by screen DPI
and use that value when needed.
This commit is contained in:
chrox
2014-08-20 09:39:50 +08:00
parent e3af23f5ef
commit 56fa8a45b7
3 changed files with 5 additions and 7 deletions

View File

@@ -73,8 +73,8 @@ function RenderText:getGlyph(face, charcode, bold, bgcolor, fgcolor)
local rendered_glyph = face.ftface:renderGlyph(charcode, bgcolor, fgcolor, bold)
if face.ftface:checkGlyph(charcode) == 0 then
for index, font in pairs(Font.fallbacks) do
-- rescale face size by DPI since it will be scaled in getFace again
local fb_face = Font:getFace(font, Screen:rescaleByDPI(face.size))
-- 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, bgcolor, fgcolor, bold)
--DEBUG("fallback to font", font)