On 2017-06-16 18:49, James Richters wrote:
agg^.Font('C:\Windows\Fonts\ConsolaB.ttf' ,45 )
works fine, but as I mentioned I can't be sure windows is installed in 
C:\Windows

When you use the Windows GDI font engine, you don't have to specify the location of the font - that is done for you in the font engine. Also you specify the font name like windows programs do, you don't specify the font filename.

For example:

  agg^.LineWidth(1);
  agg^.Font('Consola' ,45, True); // Bold
  agg^.Text(300 ,100 ,'Consola font here.' );
  agg^.Font('Courier New' ,45, False, True );  // Italics
  agg^.Text(300 ,150 ,'Courier New font here.' );


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to