nanogui: Freetype2 library


Previous by date: 9 Jun 2009 22:02:24 -0000 Re: Freetype2 library, Junior
Next by date: 9 Jun 2009 22:02:24 -0000 webkit on Nano-X, Bajimohanreddy Bandi
Previous in thread: 9 Jun 2009 22:02:24 -0000 Re: Freetype2 library, Junior
Next in thread:

Subject: Re: [nanogui] Freetype2 library
From: Junior ####@####.####
Date: 9 Jun 2009 22:02:24 -0000
Message-Id: <72243EA20B8.000003F7ejr@inbox.com>

> -----Original Message-----
> From: ####@####.####
> Sent: Mon, 8 Jun 2009 23:14:14 -0600
> To: ####@####.#### ####@####.####
> Subject: Re: [nanogui] Freetype2 library
> 
>> I thought I added this to freetype 1.  If UseBackground is TRUE,
>> then the bounding box for the text is cleared first, before the
>> text bitmap is drawn.
> 
>> I don't see this in freetype1 code either. Perhaps a patch not merged?
>> Should this be something freetype2_drawtext takes care of, or should the
>> background be set before the
>> bitmap is created?
> 
> Look at the GdArea call and comments above it in
> font_freetype.c::drawchar().
> It appears there may be a bug in GdArea if fg == bg.

Hi Greg,
I'm not sure who wrote the freetype2 code but when the FT_Bitmap bitmap is created I'm
not sure if this bitmap need to be "pre-prepared" with the background color or it should be drawn
in when the character is drawn. The freetype2_drawtext looks up each character and use GdDrawAreainternal to draw the text using linear16_drawarea_alphacol in my case. I tried drawing the background in the latter function and although most pixels were erased, the spaces were not. It seems that the characters' background should be handled in the freetype2_drawtext routine but I'm not sure how best this could be done.
If someone would suggest a way to prepare the bitmap that would be great (providing that the FT lookup does not change it).

Previous by date: 9 Jun 2009 22:02:24 -0000 Re: Freetype2 library, Junior
Next by date: 9 Jun 2009 22:02:24 -0000 webkit on Nano-X, Bajimohanreddy Bandi
Previous in thread: 9 Jun 2009 22:02:24 -0000 Re: Freetype2 library, Junior
Next in thread:


Powered by ezmlm-browse 0.20.