koreader/rendertext_example.lua
HW f307264fb6 added freetype text rendering (still buggy)
this allows to render glyphs and also brings a simple
engine for rendering UTF-8 strings onto the framebuffer.
blitting to uneven offset is implemented here, too, but
needs more work and is still buggy.

In the end, this will allow for a simple GUI.
2011-12-01 01:35:53 +01:00

17 lines
284 B
Lua

require "rendertext"
fb = einkfb.open("/dev/fb0")
width, height = fb:getSize()
print("open")
face = freetype.newBuiltinFace("Helvetica", 64)
print("got face")
renderUtf8Text(100,100,face,"h","Hello World! äöü")
fb:refresh()
while true do
local ev = input.waitForEvent()
end