freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Extra data for 3D acceleration


From: Bruce Long
Subject: [ft-devel] Extra data for 3D acceleration
Date: Fri, 18 Dec 2009 09:53:03 -0700

I'm working on code to implement rendering of fonts on a GPU. In reality, the fonts will be rendered on the CPU using FreeType2 and a texture representing the shape will be sent to the GPU as in the paper at alice.loria.fr/publications/papers/2005/VTM/vtm.pdf.

To do that I need certain information at each pixel. Namely: 1) Where at the top or left side of the pixel, does the first discontinuity occur (If there is more than one discontinuity it will increase the resolution until there is only one.) 2) At that point, what is the angle to the tangent of the discontinuity. 3) Likewise for the bottom or right side of the pixel.

If rastering vertically, I need that info for the sides of the pixel, but if rastering horizontally, I need the info for the points on the top and bottom of the pixel. I don't need both. (See figure 5 in the above paper for a diagram.)

My plan is to modify the 'grays' raster to generate this data and send it to the 'call-back' function where I will create the necessary texture for the GPU.

I have that all set up (raster as StandAlone), and I just need to figure out how to calculate that data. Before I look more closely at how grays_raster is doing its thing, I thought it prudent to seek advice and communicate what I am doing. This weekend/week I will be fiddling with the renderer to discover how to get this data. My assumptions are that the ftgrays AA rasterer is the best choice because it has the most data points. (Though the texture map I will generate stores only black/white; the GPU will calculate the gray/opacity level from the above data.

If anyone is thinking "Oh, that's easy, just use raster X in mode Y and then ....." would you enlighten me?

Thanks,

Bruce

--
Give me immortality or give me death!

reply via email to

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