nanogui: TrueType not using specified background


Previous by date: 13 Jun 2008 01:52:22 -0000 TrueType not using specified background, Junior
Next by date: 13 Jun 2008 01:52:22 -0000 Font Color RGB-YUV driver/fblin16.c, Prashanth Dwarakanath
Previous in thread: 13 Jun 2008 01:52:22 -0000 TrueType not using specified background, Junior
Next in thread: 13 Jun 2008 01:52:22 -0000 Re: TrueType not using specified background, Junior

Subject: Re: [nanogui] TrueType not using specified background
From: "Greg Haerr" ####@####.####
Date: 13 Jun 2008 01:52:22 -0000
Message-Id: <004301c8ccf8$654b0470$6401a8c0@winXP>

> Is their some design reason why truetype fonts do not use the background 
> color specified in gc?
The other bitmap fonts do use it but I'm not sure why not ttf fonts.

Sounds like a bug, although interesting nobody has found it...  try 
modifying
the src/demo/nanox fontdemo?.c app that draws text around a circle,
lets use a non-white background.  Thinking about this I'll bet that
all TTF drawing occurs without drawing any background...


> Is this something the that needs to be done in nano-X devfonts code or is 
> it something that I need to build into the freetype library?

No, this would be done in the devfont.c code.  There are two options:
when the background is set to ON, then you can either clear the
background with a GdFillRect first, then let the engine draw
the glyph foreground bits only, or have the engine draw the glyph
foreground and background bits. I suggest using the former; internal
builtin fonts are displayed using the latter (its pretty slow drawing
each bit, TTF uses a blit unlike builtin fonts)

Since TTF allows text to be displayed at an angle, I'm betting that
this is why its not implemented.  The simple case would be to
implement it only for non-angled text only.

Regards,

Greg 


Previous by date: 13 Jun 2008 01:52:22 -0000 TrueType not using specified background, Junior
Next by date: 13 Jun 2008 01:52:22 -0000 Font Color RGB-YUV driver/fblin16.c, Prashanth Dwarakanath
Previous in thread: 13 Jun 2008 01:52:22 -0000 TrueType not using specified background, Junior
Next in thread: 13 Jun 2008 01:52:22 -0000 Re: TrueType not using specified background, Junior


Powered by ezmlm-browse 0.20.