Is freetype2 loaded?

I have a CGI application that can use freetype2 if it is loaded, in my installation program I am trying to automatically determine if freetype2 is loaded (instead of just asking the installer) does anyone know how to query the system to see if freetype2 is installed (without loading the library which can cause the program to fail)?
Who is Participating?
ITcrowConnect With a Mentor Commented:
LD_LIBRARY_PATH is only good for Solaris and Linux

And you cannot rely on the result or existence of this variable as it is not a required variable setting.

Your best bet will be to look at the default location ( directory where fonts are installed )  on your targetted platforms and then check.
-  Find OS
- Get the predefined location for freetype2 fonts on this platform.
- Check if font directory exists.
- Double check by checking the existence of default font files.
- You can be creative and even check if the font file is okay, by comparing it's size or by
   writing something using that font in temp directory and comparing the size of resulting file.
hernst42Connect With a Mentor Commented:
You can check if the lib is found in the directories listed in the envirnoment variable LD_LIBRARY_PATH and the pathes listed in /etc/ . If that files is found the lib should be available.

In Linux:
rpm -q freetype
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

healthstatusAuthor Commented:
Will the LD_LIBRARY_PATH be set on a Windows box, or just the *nixes?
That variable will only be available on *nixes. So you are using it on windows??
healthstatusAuthor Commented:
Cross platform, Sun, *nix and Windows.  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.