freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Thick contours


From: Dave Williss
Subject: Re: [ft] Thick contours
Date: Wed, 30 Mar 2005 08:56:12 -0600

The way we render outline fonts is to ask FreeType for the curves themselves which we then turn into a simple polygon (or set of polygons) which we just render using normal line drawing functions.  This has the advantage that the center is actually hollow. 
 
Back in the days of pen plotters that actually dragged pens around the paper, this was the best (only) way to render fonts. 
----- Original Message -----
Sent: Wednesday, March 30, 2005 6:35 AM
Subject: [ft] Thick contours

As the attached screenshot shows, I’d like to render “outlined” fonts. On the left, this is the Photoshop version, on the right this is mine.

I don’t know how Photoshop does, but my method is quite simple:

- I render 4 times in black, with a 1 pixel offset in X and Y -> it gives (x+1, y+1), then (x-1, y+1), then (x-1, y-1), and finally (x+1, y-1)

- Then I render in white on top of that on location (x, y)

 

My rendering is pixel aligned, and the generated texture font too (it’s an OpenGL application, so I render all glyphs in a memory texture for faster access). I use exactly the same font in all 5 render steps. As an example, I attached you the plain standard rendering at the same size (Standard font.bmp) I made using FreeType.

 

As you can see the result for the outline is quite deceiving, would you have any advice on this? I’d like to have the best result possible …

 

(sorry David for the private mail I sent you before subscribing to the mailing list)

 

Kind regards

 


_______________________________________________
Freetype mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype

reply via email to

[Prev in Thread] Current Thread [Next in Thread]