diff --git a/CHANGES b/CHANGES index 5b2b1a09e..d65553c05 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.8 + - Added access to Xft font pointer (STR #1328) - Fixed endianness in OS X mouse cursor graphics (STR #1348) - Fixed crash on mixed use of keyboard and mouse for diff --git a/FL/x.H b/FL/x.H index 91cbb9487..37194bc2b 100644 --- a/FL/x.H +++ b/FL/x.H @@ -69,6 +69,7 @@ extern FL_EXPORT Colormap fl_colormap; extern FL_EXPORT GC fl_gc; extern FL_EXPORT Window fl_window; extern FL_EXPORT XFontStruct* fl_xfont; +extern FL_EXPORT void *fl_xftfont; FL_EXPORT ulong fl_xpixel(Fl_Color i); FL_EXPORT ulong fl_xpixel(uchar r, uchar g, uchar b); FL_EXPORT void fl_clip_region(Fl_Region); diff --git a/documentation/osissues.html b/documentation/osissues.html index 3d5b9d767..95050cf0b 100644 --- a/documentation/osissues.html +++ b/documentation/osissues.html @@ -139,7 +139,17 @@ href="drawing.html#fl_color">fl_color() would use. href="drawing.html#fl_font">fl_font(). This is not necessarily the current font of fl_gc, which is not set until fl_draw() is -called. +called. If FLTK was compiled with Xft support, fl_xfont +will usually be 0 and fl_xftfont will contain a pointer +to the XftFont structure instead. + +
If FLTK was compiled with Xft support enabled, fl_xftfont +Points to the xft font selected by the most recent fl_font(). Otherwise +it will be 0. fl_xftfont should be casted to +XftFont*.