[Lazarus] TFPImageCanvas and TFreeTypeFont colors

Leonardo M. Ramé l.rame at griensu.com
Fri May 10 21:10:50 CEST 2013


On 2013-05-10 21:00:37 +0200, Michael Van Canneyt wrote:
> 
> 
> On Fri, 10 May 2013, Leonardo M. Ramé wrote:
> 
> >On 2013-05-10 20:34:00 +0200, Michael Van Canneyt wrote:
> >>
> >>
> >>On Fri, 10 May 2013, Leonardo M. Ramé wrote:
> >>
> >>>Hi, I'm writing text over TFPImageCanvas using a TFreeTypeFont, and I
> >>>noted some times, the text contains wrong colors around the pixels of
> >>>the text.
> >>>
> >>>I've attached an image to show the problem. As you can see, the text
> >>>over light gray and white is adding red dots, that doesn't have to be
> >>>there.
> >>>
> >>>The resulting image is an TFPMemoryImage composed of two TFPImageCanvas
> >>>one containing the image and a 2nd one containing the text.
> >>>
> >>>How can I avoid those red dots?.
> >>
> >>Are you using antialiasing ?
> >>If so, try switching it off.
> >>
> >
> >Thanks, after setting AntiAliased to false, the red dots where removed,
> >but fonts look really ugly (like shrinked or something). Please take a
> >look at the attached image, the font is Arial 10.
> 
> Strange. Did you rescale any of the images ?
> 

No. I've also tested writing the image to a bmp file, but the result is
the same.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list