mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user