mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix the kerning check in renderUtf8TextWidth()
This is a completion of my fixes that went into PR \#383. In the function renderUtf8TextWidth() the check for kerning was meaningless (always true).
This commit is contained in:
@@ -123,7 +123,7 @@ function renderUtf8TextWidth(buffer, x, y, face, text, kerning, w)
|
||||
if pen_x < w then
|
||||
local charcode = util.utf8charcode(uchar)
|
||||
local glyph = getGlyph(face, charcode)
|
||||
if kerning and prevcharcode then
|
||||
if kerning and (prevcharcode ~= 0) then
|
||||
pen_x = pen_x + face.ftface:getKerning(prevcharcode, charcode)
|
||||
end
|
||||
buffer:addblitFrom(glyph.bb, x + pen_x + glyph.l, y - glyph.t, 0, 0, glyph.bb:getWidth(), glyph.bb:getHeight())
|
||||
|
||||
Reference in New Issue
Block a user