There is definitely a bug in the font rendering.
The component TCBlabel putting it on the form and running the project can not be seen if it is run under LAZARUS 1.6 + OSX bgrabitmap8.8.2.
While on LAZARUS 1.6 WIN + bgrabitmap8.8.2 it works.
Although this code does not work under OSX:
procedure TForm1.FormPaint(Sender: TObject);
var
image: TBGRABitmap;
c: TBGRAPixel;
begin
image := TBGRABitmap.Create(ClientWidth,ClientHeight, ColorToBGRA(ColorToRGB(clBtnFace)) );
c := ColorToBGRA(ColorToRGB(clBtnText)); //retrieve default text color
image.FontHeight := 30;
image.FontAntialias := true;
image.FontStyle := [fsBold];
image.TextOut(ClientWidth-5,5,'Hello world',c,);
image.SetPixel(5,5,c);
image.Draw(Canvas,0,0,True);
image.free;
end;
Anonymous
Yes. I don't have a Mac to debug it. For now the workaround is to turn off the optimisation of using RGBA order for images. See http://forum.lazarus.freepascal.org/index.php/topic,24239.msg206424.html#msg206424
Last edit: circular 2016-04-28
I believe it has been fixed recently with define RENDER_TEXT_ON_TBITMAP in BGRAText,