Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-10

How to know if font is Fixed Width or not

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

As the subject says. How can I determine if a font is a fixed font or not? This is actually for fpGUI Toolkit so I guess I need low level API calls for this. But maybe this is also implemented in the LCL's widgetset backends.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/
Graeme Geldenhuys
to theo
theo wrote
There is an example in lazarus/examples/fontenum It shows how to filter the font list for FIXED_PITCH or MONO_FONT Maybe this helps.

Thanks I'll go take a look. At the moment I used a very crude method by looking for 'mono', 'fixed' or 'courier' in the font name. :-) Hopefully there is a better solution than that.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/