freetype
[Top][All Lists]
Advanced

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

[ft] subpixel positioning


From: Sergey Tolstov
Subject: [ft] subpixel positioning
Date: Fri, 28 Sep 2007 21:25:22 -0700

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




reply via email to

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