00001 #ifndef __AFM_H 00002 #define __AFM_H 00003 00005 00011 00012 typedef struct afm_base_char{ 00013 int ascii_code; 00014 float width; 00015 char* name; 00016 //int ps_code; ///< post-scriptovy kod 00017 struct afm_base_char* next; 00018 } afm_base_char; 00019 00021 typedef struct afm_composite_char{ 00022 char* name; 00023 int x_offset; 00024 int y_offset; 00025 struct afm_composite_char* next; 00026 } afm_composite_char; 00027 00029 typedef struct afm_composite{ 00030 char* name; 00031 afm_composite_char* chars; 00032 struct afm_composite* next; 00033 } afm_composite; 00034 00036 typedef struct afm_kerning{ 00037 char* name1; 00038 char* name2; 00039 int x_offset; 00040 struct afm_kerning* next; 00041 } afm_kerning; 00042 00044 typedef struct afm_font{ 00045 afm_base_char* base_char; 00046 afm_composite* composite; 00047 afm_kerning* kerning; 00048 } afm_font; 00049 00051 typedef struct afm_glyph{ 00052 char* name; 00053 int ps_code; 00054 struct afm_glyph* next; 00055 } afm_glyph; 00056 00057 00059 00063 void afm_load(const char* file_name, afm_font** font); 00065 00068 void afm_del(afm_font** font); 00069 00071 00075 void afm_glyph_load(const char* file_name, afm_glyph** glyph); 00076 00078 00081 void afm_glyph_del(afm_glyph** glyph); 00082 #endif