[fpc-pascal] Implementing AggPas with PtcGraph
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Sun Jun 18 18:32:28 CEST 2017
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
More information about the fpc-pascal
mailing list