[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Freetype2 library
From: Junior ####@####.#### Date: 4 Jun 2009 16:41:14 -0000 Message-Id: <307939944C8.0000004Eejr@inbox.com> Hi, All I've tested the freetype2 library, something I'm been meaning to do for a while. So far it looks good. I do have one issue I'm not sure how to get around. If I write the same text the same place, or two different text the same place, the previous text is not cleared first. That is, it does not paint the background while it draws the new text. I set UseBackground but that didn't help. Anyone knows how to do this? How do I also get it to paint a square where a space should be (so as not to ignore white space)? Thanks. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
RE: [nanogui] Freetype2 library
From: Junior ####@####.#### Date: 5 Jun 2009 21:04:31 -0000 Message-Id: <3F586830BC2.00000345ejr@inbox.com> > -----Original Message----- > From: ####@####.#### > Sent: Thu, 4 Jun 2009 08:42:49 -0800 > To: ####@####.#### > Subject: [nanogui] Freetype2 library > > Hi, > All I've tested the freetype2 library, something I'm been meaning to do > for a while. > So far it looks good. I do have one issue I'm not sure how to get around. > If I write the same text the same place, or two different text the same > place, the previous text is not cleared first. That is, it does not paint > the background while it draws the new text. I set UseBackground but that > didn't help. Anyone knows how to do this? How do I also get it to paint a > square where a space should be (so as not to ignore white space)? > Thanks. Hi, After some tests I realize drawing the text in opaque mode is really what I need. does anyone know how to draw TTF fonts opaque? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Freetype2 library
From: "Greg Haerr" ####@####.#### Date: 7 Jun 2009 02:22:38 -0000 Message-Id: <164001c9e716$d0a79470$6464a8c0@winXP> > After some tests I realize drawing the text in opaque mode is really what > I need. > does anyone know how to draw TTF fonts opaque? 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. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Freetype2 library
From: Junior ####@####.#### Date: 8 Jun 2009 23:18:32 -0000 Message-Id: <663BD526D80.00000373ejr@inbox.com> > -----Original Message----- > From: ####@####.#### > Sent: Sat, 6 Jun 2009 20:22:31 -0600 > To: ####@####.#### ####@####.#### > Subject: Re: [nanogui] Freetype2 library > >> After some tests I realize drawing the text in opaque mode is really >> what >> I need. >> does anyone know how to draw TTF fonts opaque? > > 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? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Freetype2 library
From: "Greg Haerr" ####@####.#### Date: 9 Jun 2009 05:14:23 -0000 Message-Id: <02da01c9e8c1$231f0f20$6464a8c0@winXP> > 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. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Freetype2 library
From: Junior ####@####.#### Date: 9 Jun 2009 14:21:47 -0000 Message-Id: <6E1EF13A2E8.00000122ejr@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. What source are you referencing? I'm using the cvs source and no comments are above it. Also, what PSD device is DrawAreaInternal using? If any of the screen device draw functions are NULL, what's the default? ____________________________________________________________ Receive Notifications of Incoming Messages Easily monitor multiple email accounts & access them with a click. Visit http://www.inbox.com/notifier and check it out! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |