00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef FL_FONT_
00034 #define FL_FONT_
00035
00036 #include <config.h>
00037
00038 # if USE_XFT
00039 typedef struct _XftFont XftFont;
00040 # elif !defined(WIN32) && !defined(__APPLE__)
00041 # include <FL/Xutf8.h>
00042 # endif // USE_XFT
00043
00050 class Fl_Font_Descriptor {
00051 public:
00053 Fl_Font_Descriptor *next;
00054 #ifndef FL_DOXYGEN // don't bother with platorm dependant details in the doc.
00055 # ifdef WIN32
00056 HFONT fid;
00057 int *width[64];
00058 TEXTMETRIC metr;
00059 int angle;
00060 FL_EXPORT Fl_Font_Descriptor(const char* fontname, Fl_Fontsize size);
00061 # elif defined(__APPLE_QUARTZ__)
00062 FL_EXPORT Fl_Font_Descriptor(const char* fontname, Fl_Fontsize size);
00063 ATSUTextLayout layout;
00064 # if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
00065 CTFontRef fontref;
00066 # endif
00067 ATSUStyle style;
00068 short ascent, descent, q_width;
00069
00070
00071 char *q_name;
00072 int size;
00073 # elif USE_XFT
00074 XftFont* font;
00075 const char* encoding;
00076 Fl_Fontsize size;
00077 int angle;
00078 FL_EXPORT Fl_Font_Descriptor(const char* xfontname);
00079 # else
00080 XUtf8FontStruct* font;
00081 FL_EXPORT Fl_Font_Descriptor(const char* xfontname);
00082 # endif
00083 Fl_Fontsize minsize;
00084 Fl_Fontsize maxsize;
00085 # if HAVE_GL
00086 unsigned int listbase;
00087 char glok[64];
00088 # endif
00089
00090 FL_EXPORT ~Fl_Font_Descriptor();
00091
00092 #endif // FL_DOXYGEN
00093 };
00094
00095 extern FL_EXPORT Fl_Font_Descriptor *fl_fontsize;
00096
00097 struct Fl_Fontdesc {
00098 const char *name;
00099 char fontname[128];
00100 Fl_Font_Descriptor *first;
00101 # ifndef WIN32
00102 char **xlist;
00103 int n;
00104 # endif
00105 };
00106
00107 extern FL_EXPORT Fl_Fontdesc *fl_fonts;
00108
00109 # ifndef WIN32
00110
00111 FL_EXPORT const char* fl_font_word(const char *p, int n);
00112 FL_EXPORT char *fl_find_fontsize(char *name);
00113 # endif
00114
00115 #endif
00116
00117
00118
00119