freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ft] QUESTION: How to find fonts on Linux


From: Turner, David
Subject: RE: [ft] QUESTION: How to find fonts on Linux
Date: Mon, 24 Oct 2005 09:49:14 +0200

Hello Christian,

Forget about what XGetFontPath() reports. This API shouldn't be used
by any new application, because it is unable to return any useful
information anyway.

Use the "fontconfig" library instead to locate all available fonts on
your system. The FontConfig API has some nice things to retrieve some
font properties without opening the file yourself. I invite you to read
its documentation at:

  http://www.xemacs.org/Documentation/packages/html/fontconfig_toc.html

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)


> -----Message d'origine-----
> De : address@hidden
> [mailto:address@hidden la part de
> Christian Langis
> Envoyé : mercredi 19 octobre 2005 22:35
> À : address@hidden
> Objet : [ft] QUESTION: How to find fonts on Linux
>
>
> Hi there
>
>     I already wrote an application with FreeType on Windows.
> I am writing
> the Linux version right now.
>
> Looking for fonts in Windows is straightforward. Inspecting
> the registry,
> you can get all fonts available in the system in the form (fontName,
> FontFile). With this in hand, you have all the data you need to feed
> FreeType with font files.
>
> On Linux, I failed with the same approach. First, I tried to get font
> directories. On the system I am using, the system function
> XGetFontPath()
> returns:
>
>   /usr/X11R6/lib/X11/fonts/misc/
>   /usr/X11R6/lib/X11/fonts/Type1/
>   /usr/X11R6/lib/X11/fonts/75dpi/
>   /usr/X11R6/lib/X11/fonts/100dpi/
>
> which contain essentially bitmap pcf.gz fonts which are
> innapropriate for my
> application (I need scalable fonts only such as TTF for
> example, it's a
> graphical application). There are few Type 1 fonts available,
> but there are
> fonts scattered between 2 file types *.pfb for the geometry
> and *.pfm for
> the metrics. How does that work with FT_New_Face() where thre
> is only one
> file parameter anyways?...
>
> A quick search on this Linux box revealed other locations, omitted by
> XGetFontPath(), containing the bulk of the fonts of interest:
>
> /pub/Documentation/Administration/Fonts/Fonts/
> /usr/share/fonts/...
>
> Considering that Freetype does not provide means to find the
> font files, the
> problem is the following: my application should (as much as possible)
> enforce an even and coherent installation between different
> Linux platforms.
> In other words, my application should provide the user with
> the same fonts
> wherever he runs it.
>
> Should I assume that the standard font directories (the 4
> above) are useless
> to search?
>
> Should I assume that the other 2 (above) are standard (always
> exist) and
> should be searched for fonts?
>
> Should I assume that there are no other places to look for?
>
> Should I resolve to program a recursive search of those
> directories (may
> delay the application) or use some freely available library?
>
> I am also thinking of packaging some free fonts with the
> application as this
> seems what /usr/share/fonts/ is for: installing application
> specific fonts.
>
> Comments & advices welcome
>
> Thanks
>
>
> 
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype
>
***********************************************************************************
Information contained in this email message is confidential and may be 
privileged, and is intended only for use of the individual or entity named 
above. If the reader of this message is not the intended recipient, or the 
employee or agent responsible to deliver it to the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the address@hidden and destroy the original 
message.
***********************************************************************************





reply via email to

[Prev in Thread] Current Thread [Next in Thread]