Added kerning for rendering text
This commit is contained in:
parent
04772ea3ee
commit
a02ae3a460
4 changed files with 151 additions and 9 deletions
|
|
@ -5,10 +5,16 @@ width, height = fb:getSize()
|
|||
|
||||
print("open")
|
||||
|
||||
face = freetype.newBuiltinFace("Helvetica", 64)
|
||||
-- face = freetype.newBuiltinFace("Helvetica", 64)
|
||||
face = freetype.newFace("test.ttf", 64)
|
||||
print("got face")
|
||||
|
||||
renderUtf8Text(100,100,face,"h","Hello World! äöü")
|
||||
if face:hasKerning() then
|
||||
print("has kerning")
|
||||
end
|
||||
|
||||
renderUtf8Text(100,100,face,"h","AV T.T: gxyt!",true)
|
||||
renderUtf8Text(100,200,face,"h","AV T.T: gxyt!",false)
|
||||
|
||||
fb:refresh()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue