From 34f5e4f752b49efe750072b6f09fd451af891513 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 25 Sep 2016 11:23:27 +0000 Subject: X11: More explicit warning when using rotated text w/o Xft. The warning is issued to stderr only once (previously: every time rotated text was used). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11978 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx index 60ee51d28..cdefdd262 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx @@ -659,7 +659,13 @@ void Fl_Xlib_Graphics_Driver::draw(const char* c, int n, int x, int y) { } void Fl_Xlib_Graphics_Driver::draw(int angle, const char *str, int n, int x, int y) { - fprintf(stderr,"ROTATING TEXT NOT IMPLEMENTED\n"); + static char warning = 0; // issue warning only once + if (!warning && angle != 0) { + warning = 1; + fprintf(stderr, + "libfltk: rotated text not implemented by X backend.\n" + " You should use the Xft backend. Check USE_XFT in config.h.\n"); + } this->draw(str, n, (int)x, (int)y); } -- cgit v1.2.3