freetype
[Top][All Lists]
Advanced

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

Re: [ft] outline get cropped when render chinese simkai.t tf font


From: seayoung
Subject: Re: [ft] outline get cropped when render chinese simkai.t tf font
Date: Thu, 11 Aug 2011 10:54:35 +0800

in freetype 2.4.6,I still use this demo with a font call "STCaiyun"(u can 
download it from http://www.fontineed.com/font/STCaiyun ),while i render the 
letter '@' with size 18,and then i meet a assert,in the file "ftstroke.c",line 
420。
this is what I call,
---------------------------------------------华丽的分隔符-----------------
    WriteGlyphAsTGA(library,
                    argv[2],
                    L'@',
                    face,
                    18,
                    Pixel32(255, 90, 30),
                    Pixel32(255, 255, 255),
                    1.0f);
---------------------------------------------华丽的分隔符-----------------
and this is where the assert is:
---------------------------------------------华丽的分隔符-----------------
  static FT_Error
  ft_stroke_border_lineto( FT_StrokeBorder  border,
                           FT_Vector*       to,
                           FT_Bool          movable )
  {
    FT_Error  error = FT_Err_Ok;
    FT_ASSERT( border->start >= 0 );
---------------------------------------------华丽的分隔符------------------
then I found if i comment the "ftstroke.c" from line 1265 to line 1372,I can 
avoid the assert。

    /* if all control points are coincident, this is a no-op; */
    /* avoid creating a spurious corner                       */
    if ( FT_IS_SMALL( stroker->center.x - control->x ) &&
         FT_IS_SMALL( stroker->center.y - control->y ) &&
         FT_IS_SMALL( control->x        - to->x      ) &&
         FT_IS_SMALL( control->y        - to->y      ) )
    {
       stroker->center = *to;
       goto Exit;
    }
---------------------------------------------华丽的分隔符-----------------
I think something should be added before statement "goto Exit;",suck as set the 
stroker's border->start。but my knowledge of the stroker is not enough to fix 
this problem, so I send this mail for a resolvent.thank u.


seayoung
2011-08-11



发件人: Werner LEMBERG
发送时间: 2011-08-02 15:35:27
收件人: seayoung
抄送: freetype
主题: Re: [ft] outline get cropped when render chinese simkai.ttf font

In January, I wrote this:
> Thanks.  Using this font, I can repeat the problem.  It's a bug in
> the stroker.
> 
> Compile the attached program and feed it with
> 
>   ./example2-scaled kt.ttf example2-scaled.tga
> 
> It scales the image of `全' by 1000% after the border has been applied
> (see attached image).
> 
> Unfortunately, I don't have time to fix that currently since my
> knowledge of the stroker is not deep enough.
> 
> BTW, this is Savannah bug #27312.  Any help in debugging this is
> highly welcomed.
I've just checked: It's fixed now with version 2.4.6.
    Werner
.

reply via email to

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