<div dir="ltr">Ok Graeme. Thanks a lot!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/26 Graeme Geldenhuys <span dir="ltr"><<a href="mailto:graeme@geldenhuys.co.uk" target="_blank">graeme@geldenhuys.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 25/06/13 19:12, Edilson Vieira wrote:<br>
> My question is How do I get the system font directory on Windows and Linux?<br>
<br>
</div>I has the same problem when I wrote a font cache system for AggPas in fpGUI.<br>
<br>
Under Windows it is easy. There is a registry entry you can query.<br>
<br>
Under Linux and FreeBSD it is not so easy. FreeBSD is slightly easier<br>
than Linux, because they are more standarised (no 1000's of distros<br>
doing there own thing) in where things must be installed.<br>
<br>
eg: Here are _some_ font paths on FreeBSD<br>
<br>
lPathList.Add('/usr/share/cups/fonts/');<br>
lPathList.Add('/usr/share/fonts/truetype/');<br>
lPathList.Add('/usr/local/lib/X11/fonts/');<br>
lPathList.Add(GetUserDir + '.fonts/');<br>
<br>
<br>
Linux will probably be similar to the above - but no guarantees. There<br>
are other font paths I haven't listed above. My font cache also runs<br>
recursively through the paths I specify. I don't know if the FontMgr you<br>
mentioned does that.<br>
<br>
I tried to look in the fontconfig source code to see how they do it, but<br>
couldn't find anything - though I didn't look too hard.<br>
<br>
Regards,<br>
- Graeme -<br>
<br>
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</blockquote></div><br></div>