Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

font.h File Reference


Data Structures

struct  _wmfFontmapData
struct  _wmfFT_CacheEntry
struct  _wmfFT_Mapping
struct  _wmfGS_FontData
struct  _wmfGS_FontInfo
struct  _wmfIPAFont
struct  _wmfXML_FontData
struct  _wmfXML_FontInfo

Defines

#define WMF_FONT_PSNAME(F)   ((F)->user_data ? ((wmfIPAFont*) (F)->user_data)->ps_name : 0)
#define WMF_FONT_FTFACE(F)   ((F)->user_data ? ((wmfIPAFont*) (F)->user_data)->ft_face : 0)

Typedefs

typedef _wmfFT_Mapping wmfFT_Mapping
typedef _wmfFT_CacheEntry wmfFT_CacheEntry
typedef _wmfGS_FontData wmfGS_FontData
typedef _wmfGS_FontInfo wmfGS_FontInfo
typedef _wmfXML_FontData wmfXML_FontData
typedef _wmfXML_FontInfo wmfXML_FontInfo
typedef _wmfFontmapData wmfFontmapData
typedef _wmfIPAFont wmfIPAFont
typedef void(* wmfCharDrawer )(wmfAPI *, wmfDrawText_t *)

Functions

void wmf_ipa_font_init (wmfAPI *, wmfAPI_Options *)
void wmf_ipa_font_map_gs (wmfAPI *, wmfGS_FontData *, char *)
void wmf_ipa_font_map_xml (wmfAPI *, wmfXML_FontData *, char *)
void wmf_ipa_font_map_set (wmfAPI *, wmfMap)
void wmf_ipa_font_map (wmfAPI *, wmfFont *)
void wmf_ipa_font_dir (wmfAPI *, char *)
float wmf_ipa_font_stringwidth (wmfAPI *, wmfFont *, char *)
char * wmf_ipa_font_lookup (wmfAPI *, char *)
void wmf_ipa_draw_text (wmfAPI *, wmfDrawText_t *, wmfCharDrawer)

Define Documentation

#define WMF_FONT_FTFACE      ((F)->user_data ? ((wmfIPAFont*) (F)->user_data)->ft_face : 0)
 

WMF_FONT_FTFACE(wmfFont* F) -> (FT_Face) freetype(2) font face

#define WMF_FONT_PSNAME      ((F)->user_data ? ((wmfIPAFont*) (F)->user_data)->ps_name : 0)
 

WMF_FONT_PSNAME(wmfFont* F) -> (char*) font name to use in postscript output


Typedef Documentation

typedef void(* wmfCharDrawer)(wmfAPI*,wmfDrawText_t*)
 

typedef struct _wmfFontmapData wmfFontmapData
 

typedef struct _wmfFT_CacheEntry wmfFT_CacheEntry
 

typedef struct _wmfFT_Mapping wmfFT_Mapping
 

typedef struct _wmfGS_FontData wmfGS_FontData
 

typedef struct _wmfGS_FontInfo wmfGS_FontInfo
 

typedef struct _wmfIPAFont wmfIPAFont
 

typedef struct _wmfXML_FontData wmfXML_FontData
 

typedef struct _wmfXML_FontInfo wmfXML_FontInfo
 


Function Documentation

void wmf_ipa_draw_text wmfAPI  ,
wmfDrawText_t  ,
wmfCharDrawer   
 

void wmf_ipa_font_dir wmfAPI  ,
char *   
 

void wmf_ipa_font_init wmfAPI  ,
wmfAPI_Options  
 

char* wmf_ipa_font_lookup wmfAPI  ,
char *   
 

void wmf_ipa_font_map wmfAPI   API,
wmfFont   font
 

This is the fun bit.

Parameters:
API  the API handle
font  WMF font object: font's family name, italics flag, and the weight
Other inputs include: a ghostscript-style Fontmap, and up to two XML RedHat-style fontmaps. (These are all parsed earlier.) There are also the fallback 13 standard postscript fonts. And then there is a list of font directories to search for fonts.

libwmf requires fonts to have a postscript name, and maintains an internal cache of glyphs path and freetype font face, keyed to postscript font name. Unfortunately, although the XML fontmaps do have font family name, the GS fontmap does not. In the latter, therefore, matching WMF font info to postscript font name is hit-and-miss.

void wmf_ipa_font_map_gs wmfAPI  ,
wmfGS_FontData  ,
char *   
 

void wmf_ipa_font_map_set wmfAPI  ,
wmfMap   
 

void wmf_ipa_font_map_xml wmfAPI  ,
wmfXML_FontData  ,
char *   
 

float wmf_ipa_font_stringwidth wmfAPI  ,
wmfFont  ,
char *   
 


Generated on Tue Dec 10 19:53:49 2002 for libwmf by doxygen1.2.18