SDL doesn't cope well with FreeSans

G

Greg Ewing

Whenever I try to use the FreeSans font with SDL,
either through PyGame or Soya, I get disappointing
results. The characters come out slightly
higglety-pigglety -- randomly displaced up or down
a pixel or so from the baseline.

Something about the calculation of the font height
seems to be off, too.

The fonts that come with MacOSX don't have these
problems, so the fault doesn't seem to be with SDL
or FreeType.

Has anyone else noticed this? If it's a problem
with the quality of FreeSans, can anyone recommend
a free Helvetica-like font family that doesn't
have this problem?
 
C

Carl Banks

Greg said:
Whenever I try to use the FreeSans font with SDL,
either through PyGame or Soya, I get disappointing
results. The characters come out slightly
higglety-pigglety -- randomly displaced up or down
a pixel or so from the baseline.

Something about the calculation of the font height
seems to be off, too.

The fonts that come with MacOSX don't have these
problems, so the fault doesn't seem to be with SDL
or FreeType.

Has anyone else noticed this? If it's a problem
with the quality of FreeSans, can anyone recommend
a free Helvetica-like font family that doesn't
have this problem?

It would depend on how you're displaying them, I would think. I
haven't seen any one-pixel-off errors for FreeSans on the screen at the
same time, but I've seen differences between Windows and Linux. (I
figured it was because of hinting, but didn't investigate.) However,
I'm rendering it with OpenGL textures, so there might be a little
difference.

1. Try increasing the pixel height by 0.5
2. Convert it to a type 1 font and see if the problem remains.
3. See if anyone on the SDL or PyGame lists know anything about it.


Carl Banks
 
G

greg

It would depend on how you're displaying them, I would think.

I've seen the same thing happen two different ways:
* Rendering with PyGame's font functions
* With Soya, which is using OpenGL textures

Both of these are using FreeType to do the rastering,
I believe.
2. Convert it to a type 1 font and see if the problem remains.

Can FreeType deal with Type 1 fonts? Also, what utility
would I use to do that (preferably on MacOSX).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top