mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
use font metric to better display help page (to exted to other pages in future)
This commit is contained in:
@@ -88,10 +88,10 @@ function renderUtf8Text(buffer, x, y, face, facehash, text, kerning)
|
||||
if kerning and prevcharcode then
|
||||
local kern = face:getKerning(prevcharcode, charcode)
|
||||
pen_x = pen_x + kern
|
||||
--print("prev:"..prevcharcode.." curr:"..charcode.." kern:"..kern)
|
||||
--print("prev:"..string.char(prevcharcode).." curr:"..string.char(charcode).." pen_x:"..pen_x.." kern:"..kern)
|
||||
buffer:addblitFrom(glyph.bb, x + pen_x + glyph.l, y - glyph.t, 0, 0, glyph.bb:getWidth(), glyph.bb:getHeight())
|
||||
else
|
||||
--print(" curr:"..charcode)
|
||||
--print(" curr:"..string.char(charcode))
|
||||
buffer:blitFrom(glyph.bb, x + pen_x + glyph.l, y - glyph.t, 0, 0, glyph.bb:getWidth(), glyph.bb:getHeight())
|
||||
end
|
||||
pen_x = pen_x + glyph.ax
|
||||
|
||||
Reference in New Issue
Block a user