Solved

Is freetype2 loaded?

Posted on 2004-09-24
6
143 Views
Last Modified: 2013-12-25
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)?
0
Comment
Question by:healthstatus
  • 2
  • 2
  • 2
6 Comments
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 250 total points
ID: 12152490
You can check if the lib libfreetype.so.6 is found in the directories listed in the envirnoment variable LD_LIBRARY_PATH and the pathes listed in /etc/ld.so.conf . If that files is found the lib should be available.
0
 
LVL 5

Expert Comment

by:ITcrow
ID: 12191896

In Linux:
rpm -q freetype
0
 
LVL 2

Author Comment

by:healthstatus
ID: 12193692
Will the LD_LIBRARY_PATH be set on a Windows box, or just the *nixes?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 48

Expert Comment

by:hernst42
ID: 12193853
That variable will only be available on *nixes. So you are using it on windows??
0
 
LVL 2

Author Comment

by:healthstatus
ID: 12193962
Cross platform, Sun, *nix and Windows.  
0
 
LVL 5

Accepted Solution

by:
ITcrow earned 250 total points
ID: 12195929
LD_LIBRARY_PATH is only good for Solaris and Linux
HPUX uses SH_LIB_PATH

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.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now