I just learn about Love2D one day ago.
I'm curious about what the reason love.graphics.newFont crash and give me segmentation fault in Fedora 19.
Fyi, i'm installing Love2D from Fedora Repo (0.8.0) and works well without any problems except this custom fonts.
This tutorial http://love2d.org/wiki/love.graphics.newFont doesn't works in Fedora 19 (gave segmentation fault).
I have no idea until i put it on draw() which is i know it's wrong.
This is works
Code: Select all
function love.load()
-- NEW
screen_width = 500
screen_height = 300
love.graphics.setCaption('GAME')
love.graphics.setMode(screen_width, screen_height)
end
function useTTFFont(text,x,y,size)
local font=love.graphics.newFont("font.ttf",size)
love.graphics.setFont(font)
love.graphics.print(text,x,y)
end
function love.update(dt)
end
function love.draw()
useTTFFont("Hello World",210,160,28)
end
Could anybody help me how to solve this issue ?
Many thanks!