473,320 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

SDL doesn't cope well with FreeSans

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?

--
Greg
Jul 27 '06 #1
2 1384

Greg Ewing wrote:
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

Jul 27 '06 #2
Carl Banks wrote:
Greg Ewing wrote:
The characters come out slightly
higglety-pigglety -- randomly displaced up or down
a pixel or so from the baseline.
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).

--
Greg
Jul 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob Tweed | last post by:
I have a customer who is having problems when their Windows 2000/IIS/PHP-based system begins to experience a level of loading that isn't, in my view, unreasonably high. I'm wondering what others...
6
by: Peter Abel | last post by:
I have an application, which is an instance of a class with a deeply nested object hierarchy. Among others one method will be executed as a thread, which can be stopped. Everything works fine...
7
by: MLH | last post by:
I tried the following code to prevent a checkbox from being updated (going from a value of Null to True, from True to False or from False to True). I was surprised it did not work. Can anyone...
19
by: James Harris | last post by:
My K&R 2nd ed has in the Reference Manual appendix, A7.4.8 sizeof yields the number of BYTES required to store an object of the type of its operand. What happens if C is running on a machine that...
11
by: Ted Miller | last post by:
Hi folks. So I'm in the middle of porting a large (previously COM-based) imaging library to .Net. The clients of this library are VB programmers within the company I work for. Their code will be...
1
by: Adrian Parker | last post by:
I have a web project called IngenWeb, and now I need to split it into two versions, production and development, so I want to name them IWebProd and IWebDev. Given that all the pages have...
89
by: Homer J Simpson | last post by:
I am coming to the conclusion that Microsoft doesn't want you to use VB ..Net, based on my experiences. I've downloaded the Express version and signed up for various support options etc. At every...
185
by: Martin Jørgensen | last post by:
Hi, Consider: ------------ char stringinput ..bla. bla. bla. do {
34
by: electrician | last post by:
Perl has it, Basic has it, Fortran has it. What is so difficult about creating a goto command for JavaScript. Just set up a label and say go to it.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.