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/
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus