freetype
[Top][All Lists]
Advanced

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

RE: [ft] subpixel positioning


From: Sergey Tolstov
Subject: RE: [ft] subpixel positioning
Date: Sat, 29 Sep 2007 00:02:48 -0700

Using FT_Glyph_Transform has allowed me to achieve the subpixel
positioning. I had a problem with it initially because of bug in my
code.

Sergey Tolstov  

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On 
> Behalf Of Sergey Tolstov
> Sent: Friday, September 28, 2007 9:25 PM
> To: address@hidden
> Subject: [ft] subpixel positioning
> 
> Hello,
> 
> Firstly, this question is not related to the LCD but regular raster.
> 
> I have a transformation matrix, which rotates and translates a glyph.
> I am able to output glyphs reasonably fine, but I always 
> round the translation coordinates before drawing the bitmap 
> as in the freetype example for WYSIWYG glyph drawing.
> However, a small subpixel offset of glyph is lost as a result 
> of rounding. If text is animated the glyphs look like 
> "dancing" a little. I would like to fix that.
> 
> I would like to take the subpixel offset into account by 
> translating the outline by the delta, such as:
> FT_Vector delta;
> delta.x = X - round(X);
> delta.y = Y - round(Y);
> 
> Is it possible to make freetype to take the delta into 
> account, so that the rendered glyph is offset by the delta 
> and the bitmap origin is updated correspondingly?
> This should be possible if freetype rasterizer can do 
> subpixel rendering (for antialiased case).
> 
> I use two methods to obtain the glyph bitmap:
> FT_Glyph_Transform
> FT_Glyph_To_Bitmap
> I was experimenting with the FT_Vector parameters, these 
> methods accept, without success.
> 
> Thanks,
> Sergey
> 
> 
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype
> 
> 




reply via email to

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