use font metric to better display help page (to exted to other pages in future)
This commit is contained in:
1 parent
81f99e4921
commit
ce30d9c652
4 files changed
+25
-22
No files matched your search
+2
-2
@@ -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