| View previous topic :: View next topic |
| Author |
Message |
MagicianFB
Joined: 10 Oct 2005 Posts: 11
|
Posted: Mon Dec 05, 2005 2:56 am Post subject: Fonts |
|
|
When I try to load a font and print it, it doesn't seem to work. Can anyone tell me what's wrong?
These are my codes:
| Code: |
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()
|
or
| Code: |
white = Color.new(255, 255, 255)
t = Font.load("times.ttf")
t:setPixelSize(0, 12)
screen:fontPrint(t, 10, 10, "hello", white)
screen:flip()
repeat
pad = Controls.read()
until pad:cross()
|
|
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Mon Dec 05, 2005 3:12 am Post subject: Re: Fonts |
|
|
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! |
|
| Back to top |
|
 |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Sat Dec 10, 2005 12:06 am Post subject: where to get em |
|
|
A good free ttf font site can be found here:
http://www.webpagepublicity.com/free-fonts-l.html#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 _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Sat Dec 10, 2005 12:23 am Post subject: Re: where to get em |
|
|
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. |
|
| Back to top |
|
 |
JoshDB

Joined: 05 Oct 2005 Posts: 87
|
Posted: Sat Dec 10, 2005 1:02 am Post subject: |
|
|
1001freefonts.com
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. |
|
| Back to top |
|
 |
netjunki
Joined: 10 Dec 2005 Posts: 1
|
Posted: Sat Dec 10, 2005 2:58 am Post subject: Truly Free Fonts |
|
|
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.
Hope that helps.
-netjunki |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Sat Dec 10, 2005 3:13 am Post subject: Re: Truly Free Fonts |
|
|
| 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. |
|
| Back to top |
|
 |
Zenurb
Joined: 30 Sep 2005 Posts: 106 Location: United Kingdom
|
Posted: Sat Dec 10, 2005 9:37 pm Post subject: Re: Truly Free Fonts |
|
|
| Shine wrote: | | 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. |
Georgia is my favourite font. _________________ Proud Dvorak User
US 1.5 PSP (Original) |
|
| Back to top |
|
 |
mrn
Joined: 02 Nov 2005 Posts: 116
|
Posted: Fri Dec 16, 2005 9:09 pm Post subject: |
|
|
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..? |
|
| Back to top |
|
 |
|