freetype-devel
[Top][All Lists]
Advanced

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

Re: Q : Is the rendering symmetric ?


From: David Turner
Subject: Re: Q : Is the rendering symmetric ?
Date: Tue, 21 Mar 2000 14:26:51 +0100

Hi Shyjan,

> 
> Hi!
>   I have the following proposal for rendering some of the difficult
> mathematical operators that need to stretch. Examples are all kinds of
> enclosing braces that need to stretch to fit the the expression that
> it encloses, and also operators like sum, integral.
> For some of them like braces one can
> actually do pretty well by gluing parts together, this is how it's done
> in TeX. For others like sum, integral, angle brackets and others one
> simply cannot build by parts since there are significant non-vertical
> or horizontal sections in these chars. Note that simply scaling
> (even using different scalings along the horizontal and vertical will
> not produce good results in most cases).
> 
> The solution I propose is to use interpolation. Say for each of these
> chars, the font designer provides two outlines at two different sizes
> (small and large) with the same number of corresponding control
> points. A char at any other size is produced by simply interpolating 
> (linearly)
> the corresponding points and rasterizing the outline. It is very
> reasonable to assume that the outline that the font designer would
> have intended for this size should be a linear interpolation of the
> two extreme outlines.
> 
> The question I have for you folks is regarding operators that come in
> pairs like enclosing fences {}, [], (). The left and right chars in
> each pair are mirror reflections of the other. Let us assume that a
> font designer who has been careful enough so that for both the "small"
> and "large" versions, he has constructed the outlines
> for these pairs in such a way that the stroke thicknesses for any
> given section of a char is the same as the corresponding thickness in
> the mirror reflection. Put another way, rendering the pairs at both
> the small and large sizes will produce pairs with an even thickness.
> It is clear that ideally linear interpolation of these pairs to any other size
> will also preserve the even thickness for both chars.
> The question is are there any artifacts (due to quantization or some
> such stuff) in the Freetype implementation that I should be aware of
> due to which an interpolated pair will not render with an
> even thickness. If so, is this not a desirable feature for Freetype to
> have ? If there is a problem, can it be fixed easily ?

You won't have problems if you're mirroring transform keeps the phase of
all glyphs relative to the pixel grid, then the result should be completely
symmetrical..

Basically, this means that your transform should use a translation that
has only integer coordinates. The best thing is still to test this thing
of course..

> Basically, the question amounts to whether the rendering algorithm
> will produce identical horizontal and vertical thicknesses if the
> glyph outline has been mirror reflected horizontally or vertically.
> 
I believe it should, if succificient care is taken.

Best Luck,

- David

> thanx for any comments in advance
> - shyjan



reply via email to

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