473,748 Members | 4,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1399

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
2056
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 think, specifically: - are these volumes, for this kind of configuration, at or beyond the levels at which PHP should be able to cope? I hope not ! - what might be done to alleviate these problems? One of our suspicions is that Windows...
6
2592
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 except that when deleting the main instance - after the thread has been stopped - the __del__ method will not be carried out. Tough a simple example works as expected: >>> class A: .... def __init__(self):
7
2516
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 offer a sensible, logical, insightful reason as to why Microsoft does not want to let programmers stop this event? Private Sub NoOwnerInfoChkBox_Click() If CurrentVehicleJobID = 0 Then
19
2114
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 addresses larger words only? Shouldn't sizeof be defined to return the smallest number of 'storage units' required to store an object of the type of its operand? As a general point, is there a guide to what aspects of C would fail if run on a...
11
1404
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 getting ported to .Net at some point in the near future too. In the .Net world, many of my objects are forced to implement the IDisposable+Finalizer pattern because they hold onto unmanaged resources or represent resources where deterministic...
1
977
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 IngenWeb.something in them, how do you go about maintaining two versions, when the development version will eventually become production ? -- Adrian Parker Ingenuity At Work
89
3833
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 turn I have found the whole experience frustrating, involving endless non functioning software, broken links, incomprehensible and irrelevant information, examples that don't work, help files that don't help and a complete lack of any sort of...
185
17416
by: Martin Jørgensen | last post by:
Hi, Consider: ------------ char stringinput ..bla. bla. bla. do {
34
26644
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
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9544
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8243
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.