diff options
| author | Manolo Gouy <Manolo> | 2017-06-02 07:16:43 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-06-02 07:16:43 +0000 |
| commit | 37bcc744c8358725c00cdfe4c8a11477d55ff31b (patch) | |
| tree | 1740a226f64c6c5e4efda365a452fef58ed0dcb7 /src/Fl_Graphics_Driver.cxx | |
| parent | 12fd93485faa0c6341b11c77b336d626f3db53cd (diff) | |
Make sure the scaling factor has been initialised when setting a font.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12248 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 806862bb8..ab3f1e499 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -24,6 +24,7 @@ #include <FL/fl_draw.H> #include <FL/Fl_Image_Surface.H> #include <FL/math.h> +#include <FL/x.H> FL_EXPORT Fl_Graphics_Driver *fl_graphics_driver; // the current driver of graphics operations @@ -377,6 +378,7 @@ void Fl_Scalable_Graphics_Driver::draw(Fl_Shared_Image *shared, int X, int Y) { void Fl_Scalable_Graphics_Driver::font(Fl_Font face, Fl_Fontsize size) { + if (!font_descriptor()) fl_open_display(); // to catch the correct initial value of scale_ font_unscaled(face, size * scale_); } |
