From adbcdddb5625d7cd49b80d5c560eb8998446183a Mon Sep 17 00:00:00 2001 From: Hans-Werner Hilse Date: Sun, 28 Sep 2014 21:02:55 +0200 Subject: [PATCH] undo wrong use of addblitFrom() rendertext.lua did use addblitFrom() for rendering text - i.e. blitting the letters to a BlitBuffer. However, it used intensity=1.0, which is the same as doing a (faster, more efficient) blitFrom(). So use that instead. What was probably intented here is a different kind of blitting - using the bitbuffer of the glyph as a mask. --- frontend/ui/rendertext.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/ui/rendertext.lua b/frontend/ui/rendertext.lua index 03a7e9464..f0eeeb6e6 100644 --- a/frontend/ui/rendertext.lua +++ b/frontend/ui/rendertext.lua @@ -163,11 +163,11 @@ function RenderText:renderUtf8Text(buffer, x, y, face, text, kerning, bold, bgco if kerning and (prevcharcode ~= 0) then pen_x = pen_x + face.ftface:getKerning(prevcharcode, charcode) end - buffer:addblitFrom( + buffer:blitFrom( glyph.bb, x + pen_x + glyph.l, y - glyph.t, 0, 0, - glyph.bb:getWidth(), glyph.bb:getHeight(), 1) + glyph.bb:getWidth(), glyph.bb:getHeight()) pen_x = pen_x + glyph.ax prevcharcode = charcode end -- if pen_x < text_width