freetype-devel
[Top][All Lists]
Advanced

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

[Devel] getting the type/backend of a FT_Face


From: Chema Celorio
Subject: [Devel] getting the type/backend of a FT_Face
Date: 18 Jan 2003 22:59:22 -0500

I could not find a clean way of getting the type of a font from an
FT_Face. I need to determine what type it is to know if gnome-print
knows how to handle the font format (for embeding in jobs).

Pango uses:
        strcmp (FT_MODULE_CLASS (face->driver)->module_name, "truetype") == 0;
to determine the backend. I am currently reading out the extension of
the fontfile which turned out to be, as expected, a very bad idea. I'm
going to use what pango is using, but was wondering if there are plans
to add an interface to query the type of font/backend used.

I found in ftxf86.c a function FT_Get_X11_Font_Format which does something
similar with a comment that says:

  /* XXX: This really is a sad hack, but I didn't want to change every     */
  /*      driver just to support this at the moment, since other important */
  /*      changes are coming anyway.                                       */

Are there plans to provide function that returns something like an enum
for each backend. Will a patch that does this speed up the process?

thanks,
Chema 




reply via email to

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