freetype
[Top][All Lists]
Advanced

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

[ft] FreeType rasterization grid fitting regime?


From: Dakai Liu
Subject: [ft] FreeType rasterization grid fitting regime?
Date: Wed, 10 May 2006 19:22:33 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Sorry If you have seen it on developer's mail list.

Hello all,

I am working on a rip project that uses FreeType 2.1.10 as font engine. While I render an Asian font at 6 point size at 600x600 dpi, the box size is 50x50. The font is a type1 font. FreeType produces un-even horizontal strokes. During debug, I found that a macro in ftraster.c:371

#define SCALED(x)  ( ( (x) << ras.scale_shift ) - (ras.precision_half) )

is trying to fit the points into the centre of a pixel. but some certain Y value is already at the centre of a pixel. So SCALED moved the Y value to the edge of the pixel. I guess this may contribute to the un-evenness of a horizontal stroke. So I modified it to:

#define SCALED(x)  ( (x) << ras.scale_shift )

So the whole grid fitting changed, but the output looks much better. also the serif at the top appeared. By examining the font file, at 6 point size at 600dpi, we should have 1 pixel sized serif.

I am pretty much puzzled and need some enlightment. I enclosed the font file.


Thanks.

--
Dakai Liu
Software Engineer
R&D
Toshiba-TAP

#####################################################################################
Note:
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mis-transmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Toshiba Australia reserves the right to monitor all e-mail communications through its networks.

Thank You.
#####################################################################################

Attachment: 1.ps
Description: PostScript document


reply via email to

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