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: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Sergey Tolstov > Sent: Friday, September 28, 2007 9:25 PM > To: [email protected] > 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 > [email protected] > http://lists.nongnu.org/mailman/listinfo/freetype > > _______________________________________________ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
