forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fonts

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
MagicianFB



Joined: 10 Oct 2005
Posts: 11

PostPosted: Mon Dec 05, 2005 2:56 am    Post subject: Fonts Reply with quote

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
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Mon Dec 05, 2005 3:12 am    Post subject: Re: Fonts Reply with quote

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
View user's profile Send private message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Sat Dec 10, 2005 12:06 am    Post subject: where to get em Reply with quote

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
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sat Dec 10, 2005 12:23 am    Post subject: Re: where to get em Reply with quote

the underminer wrote:
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


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
View user's profile Send private message
JoshDB



Joined: 05 Oct 2005
Posts: 87

PostPosted: Sat Dec 10, 2005 1:02 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
netjunki



Joined: 10 Dec 2005
Posts: 1

PostPosted: Sat Dec 10, 2005 2:58 am    Post subject: Truly Free Fonts Reply with quote

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
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sat Dec 10, 2005 3:13 am    Post subject: Re: Truly Free Fonts Reply with quote

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
View user's profile Send private message
Zenurb



Joined: 30 Sep 2005
Posts: 106
Location: United Kingdom

PostPosted: Sat Dec 10, 2005 9:37 pm    Post subject: Re: Truly Free Fonts Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Fri Dec 16, 2005 9:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group