Recent

Author Topic: Trying to use bgrabitmap4nogui and font settings do not work from console app  (Read 1548 times)

vonskie

  • Full Member
  • ***
  • Posts: 139
c := ColorToBGRA(ColorToRGB(cllime));
                //text
                image.FontHeight := 15;
                image.FontAntialias := True;
                //image.FontStyle := [fsbold]; this gives error also

                 image.TextRect(rect(0, 0, 200, bmp.Height), report,
                  taLeftJustify, tlbottom, c);

I get message can not find fonts family arial in eazylazfreetype

I have a standard windows application that works just not fine just not in the console app..

So how do I get it to work as a console app and find the fonts so bgra can use it?


               
« Last Edit: August 30, 2017, 03:10:57 am by vonskie »

RolandC

  • Guest
Hello!

Here is an example provided by the author of BGRABitmap.

You must have arial.ttf in the program directory (even if you don't use it) and eventually another *.ttf file (if you use another font).

Your must also have this line at the beginning of your program:

Code: Pascal  [Select][+][-]
  1. TBGRABitmap.AddFreeTypeFontFolder(GetCurrentDir);

I hope that it helps you.
« Last Edit: August 30, 2017, 07:17:12 pm by RolandC »

 

TinyPortal © 2005-2018