Displaying Unicode text [Solved]
Posted: Tue Sep 05, 2017 6:44 am
Hello all,
I have a simple question, why is it when I run the following piece of code in main.lua, the japanese text in the .txt file does not display properly (the text is displayed as boxes) and how do I fix this?
I am using Google's NotoMono font, which does support japanese text.
As you can guess, my larger question is how to display in the love window any string of Unicode text that a font supports.
I have a simple question, why is it when I run the following piece of code in main.lua, the japanese text in the .txt file does not display properly (the text is displayed as boxes) and how do I fix this?
Code: Select all
love.graphics.setFont(love.graphics.newFont'NotoMono.ttf')
local text = love.filesystem.read'japanese.txt'
function love.draw()
love.graphics.print(text,0,0)
end
As you can guess, my larger question is how to display in the love window any string of Unicode text that a font supports.