[Lazarus] System Font Dir for Font Manager Search Path

Edilson Vieira vieira.edilson at gmail.com
Thu Jun 27 16:10:19 CEST 2013


Ok Graeme. Thanks a lot!


2013/6/26 Graeme Geldenhuys <graeme at geldenhuys.co.uk>

> On 25/06/13 19:12, Edilson Vieira wrote:
> > My question is How do I get the system font directory on Windows and
> Linux?
>
> I has the same problem when I wrote a font cache system for AggPas in
> fpGUI.
>
> Under Windows it is easy. There is a registry entry you can query.
>
> Under Linux and FreeBSD it is not so easy. FreeBSD is slightly easier
> than Linux, because they are more standarised (no 1000's of distros
> doing there own thing) in where things must be installed.
>
> eg: Here are _some_ font paths on FreeBSD
>
>     lPathList.Add('/usr/share/cups/fonts/');
>     lPathList.Add('/usr/share/fonts/truetype/');
>     lPathList.Add('/usr/local/lib/X11/fonts/');
>     lPathList.Add(GetUserDir + '.fonts/');
>
>
> Linux will probably be similar to the above - but no guarantees. There
> are other font paths I haven't listed above. My font cache also runs
> recursively through the paths I specify. I don't know if the FontMgr you
> mentioned does that.
>
> I tried to look in the fontconfig source code to see how they do it, but
> couldn't find anything - though I didn't look too hard.
>
> Regards,
>   - Graeme -
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130627/97269adc/attachment-0003.html>


More information about the Lazarus mailing list