On 2017-08-21 09:18, Michael Van Canneyt via Lazarus wrote:
The '../demos/fonts' and other hardcoded values are maybe not really
a good idea:)
For the life of me, I couldn't think of another solution. eg: you might
have a headless reporting CGI app and needs to look for fonts in a
specific location, not the general "fonts" directories of the system.
But yes, the hard-coded paths like....
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/....');
isn't ideal. Especially if you consider the inconsistency between Linux
distros, and the fact that FreeBSD uses /usr/local/share/fonts/ instead
of /usr/share/fonts/
But again, unless we extend the IFDEFs for most used OSes, I couldn't
think of a better solution.
What if we introduce a global (or user-defined)
~/.config/fpreport/fpreport.ini file that specifies default font search
paths for our specific reporting needs - per system? But then again,
isn't that what the standardised $HOME/.fonts/ is for?
Sorry, just thinking out loudly. ;-)
Regards,
Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
My public PGP key: http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus