freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel]Oversampling and rounding TrueType glyphs


From: David Turner
Subject: Re: [Devel]Oversampling and rounding TrueType glyphs
Date: Mon, 13 Nov 2000 21:59:17 +0100

I Keith,

> 
> I'm working on a system which requires that I oversample glyphs by a 
> factor of 6 along one axis.  The problem is I can't figure out how to get 
> the rasterizer to snap coordinates to the original grid, rather than at 
> 1/6th pixel intervals.  The resulting glyphs lose much of their clarity as 
> a result.  Examples can be viewed at:
> 
> http://www.xfree86.org/~keithp/render/clear.html
> 

I have sent some notes regarding this very problem to the Render
list. Did you receive it ? In all cases, please try the following
method, and re-contact me if this doesn't work:

  - set the character size to normal (unexpanded one)

  - load the glyph outline (this will hint the edges to the
    current pixel grid).

  - transform it

  - render it

which gives:

   {
     FT_Matrix  matrix;

     matrix.xx = 0x60000L;
     matrix.yy = 0x10000L;
     matrix.xy = matrix.yx = 0;

     error = FT_Load_Glyph( face->glyph, glyph_index, FT_LOAD_DEFAULT );
     if (error) ....

     FT_Outline_Transform( &face->glyph->outline, &matrix );

     FT_Render_Glyph( face->glyph );
   }

Hope this helps,

- David




reply via email to

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