[Lazarus] RE : How to I publish the SearchFont method of TFontManager?
Graeme Geldenhuys
graemeg.lists at gmail.com
Tue Jun 21 13:00:01 CEST 2011
On 21/06/2011 12:30, silvioprog wrote:
> function LSFontExists(const AFileName: TFileName): Boolean;
> {$IFDEF UNIX}
> const
> VFontPath = '/usr/share/fonts';
> {$ENDIF}
> begin
> Result := FileExists(AFileName) or
> {$IFDEF UNIX}
> (FileExists(VFontPath + AFileName)) or
> (FileExists(VFontPath + '/truetype/' + AFileName)) or
> (FileExists(VFontPath + '/truetype/freefont/')) ;
> {$ENDIF}
Maybe one should add ~/.fonts/ to the search path as well? For example,
I often have custom fonts installed in my home directory, which are not
accessible to other users on the system.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
More information about the Lazarus
mailing list