freetype
[Top][All Lists]
Advanced

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

Re: Re: [Freetype] FT_Render_Glyph doesn't work well


From: CHEN LIANG
Subject: Re: Re: [Freetype] FT_Render_Glyph doesn't work well
Date: Sun, 18 May 2003 10:16:6 +0800

Hello,jonathan

        Thanks jon.You are right.Now my code works well.Thanks a lot
        

======= 2003-05-17 16:34:00 You wrote=======

>Hi,
>
>"CHEN LIANG" <address@hidden> wrote:
>> I use the FT_Render_Glyph function to render a char from the windows font>
>> "arial",but I find there is only outline in the rendered bitmap .The inner
>> part is not filled.Why ?
>> The following is my test code
>[...]
>> char* pBitmap;
>[...]
>> if(pBitmap[i*bitmap_cols+j]>0) printf("1");
>> else printf("0");
>
>This looks like a problem with signed chars.  A fully-opaque pixel will have
>a value of (unsigned char)255 == (signed char)-1.  So your test for >0 will
>return false, except for the pixels around the edges that have values between
>1 and 127.
>
>What happens if you use "unsigned char *pBitmap" rather than "char *pBitmap"?
>And/or change "if(pBitmap[i*bitmap_cols+j]>0)" to 
>"if(pBitmap[i*bitmap_cols+j]!=0)".
>
>Kind regards,
>
>Jon Foster
>--
>
>
>
>_______________________________________________
>Freetype mailing list
>address@hidden
>http://www.freetype.org/mailman/listinfo/freetype

= = = = = = = = = = = = = = = = = = = =
                        

                                                           Sincerely Liang CHEN







reply via email to

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