white = Color.new(255, 255, 255)
t = Font.load("times.ttf")
screen:fontPrint(t, 10, 10, "hello", white)
screen:flip()
repeat
pad = Controls.read()
until pad:cross()
Setting the pixel size is a good idea, but it is called like in Freetype, setPixelSizes and like in all other true type font output functions, like in Java AWT, Windows GDI etc., the y-coordinate specifies the base line of the output.
BTW: times.ttf sounds not like a free font. A warning: Don't distribute copyrighted fonts in your games and programs, like standard Windows system fonts, without the permission of the copyright holder!
A good free ttf font site can be found here: http://www.webpagepublicity.com/free-fo ... #FreeFonts
If it says that the service is unaivalable, try again later. I'm not a font expert, so if someone finds something remotely normal like arial or tahoma, post here
the underminer wrote:A good free ttf font site can be found here: http://www.webpagepublicity.com/free-fo ... #FreeFonts
If it says that the service is unaivalable, try again later. I'm not a font expert, so if someone finds something remotely normal like arial or tahoma, post here
I'm not sure if the fonts are really free. The webpage says, that you can download the fonts and install it in your Windows system, but it doesn't say that you can distribute the fonts with your own programs. And e.g. I've downloaded "Lapland Bold" and the copyright information within the font says "Copyright (c)1992-1994 Weatherly Systems, In.c All Rights Reserved. Redistribution is stricly prohibited". So unless the author of the webpage has the permission from all the copyright holders of the fonts, it would be problematic to use the fonts.
But if you don't need special fonts, just use the built-in font in Lua Player. It is a "normal" font: a sans-serif font like Arial and the same typeface with fixed font characters.
They told me that I could distribute their fonts with freeware games. Most free font sites will allow that to be the case as long as the program is freeware.
I've recently been dealing with font licensing for work.
DejaVu is a nice font that is distributed under a BSD style license. It can be downloaded here: http://dejavu.sourceforge.net/wiki/index.php/Main_Page
There is a link here to other Bitstream Vera Derivatives, but most of them have been merged with DejaVu.
netjunki wrote:
There is a link here to other Bitstream Vera Derivatives, but most of them have been merged with DejaVu.
Thanks. In Lua Player Bitstream Vera itself is integrated, but only the sans-serif proportional and mono-spaced, because serif doesn't look very good on computer screens.
netjunki wrote:
There is a link here to other Bitstream Vera Derivatives, but most of them have been merged with DejaVu.
Thanks. In Lua Player Bitstream Vera itself is integrated, but only the sans-serif proportional and mono-spaced, because serif doesn't look very good on computer screens.
Is there a way to display accents without switching to TTF?
I just started to work on a dictionary-like thing and would need to print
áéíóúöäü, etc
- by using the standard fontset, or
- by some fast way of re-displaying text with ttf,
- or..?