2011-12-08 00:25:42 +00:00
|
|
|
#!./kpdfview
|
2011-12-01 00:35:53 +00:00
|
|
|
require "rendertext"
|
2011-12-07 23:45:39 +00:00
|
|
|
require "graphics"
|
2011-12-01 00:35:53 +00:00
|
|
|
|
|
|
|
fb = einkfb.open("/dev/fb0")
|
|
|
|
width, height = fb:getSize()
|
|
|
|
|
|
|
|
print("open")
|
|
|
|
|
2011-12-02 00:31:13 +00:00
|
|
|
face = freetype.newBuiltinFace("sans", 64)
|
|
|
|
--face = freetype.newFace("test.ttf", 64)
|
2011-12-01 00:35:53 +00:00
|
|
|
print("got face")
|
|
|
|
|
2011-12-01 15:11:43 +00:00
|
|
|
if face:hasKerning() then
|
|
|
|
print("has kerning")
|
|
|
|
end
|
|
|
|
|
2011-12-02 00:43:55 +00:00
|
|
|
fb.bb:paintRect(1,1,599,300,7);
|
|
|
|
|
2011-12-02 00:31:13 +00:00
|
|
|
renderUtf8Text(fb.bb, 100, 100, face, "h", "AV T.T: gxyt!", true)
|
|
|
|
renderUtf8Text(fb.bb, 100, 200, face, "h", "AV T.T: gxyt!", false)
|
2011-12-01 00:35:53 +00:00
|
|
|
|
|
|
|
fb:refresh()
|
|
|
|
|
|
|
|
while true do
|
|
|
|
local ev = input.waitForEvent()
|
|
|
|
end
|