Loading Fonts

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
mplacona
Posts: 28
Joined: Tue Aug 07, 2007 7:07 am

Loading Fonts

Post by mplacona »

Can somebody here tell me how to load a font in OSLIB. Of course I've already read and re-read the manual, and am using the normal code to load the font

Code: Select all

oslLoadFontFile
Turns out that never happens, it loads something very strage, and unreadable.

I've created the font with the tool provided to do so, and even got a font file from the samples, but nothing works here. I'm sure there should be something else, or even an easier way to load fonts. I've tried some examples I found here, but they don't seem to work very well.

Can somebody help me with that?

Cheers
Smong
Posts: 82
Joined: Tue Sep 04, 2007 4:44 am

Post by Smong »

Somewhere along the line do you have to specify a pixel format (something like 8888)? If you specify it incorrectly it could cause textures to appear messed up.

I've never tried OSLIB, but surely there must be a sample program that uses font loading? If there aren't any samples then you could try looking for a game that was made with OSLIB and then check its source code to see how it does it.
(+[__]%)
califrag
Posts: 30
Joined: Wed Apr 04, 2007 4:43 pm

Post by califrag »

I don't know how easy it would be to incorporate into OSLib, but the pgeFont engine by Insert_Witty_Name is fast, flexible, and easy to use. I use it in any of my programs that need fonts.
Post Reply