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