From 37bcc744c8358725c00cdfe4c8a11477d55ff31b Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 2 Jun 2017 07:16:43 +0000 Subject: 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 --- src/Fl_Graphics_Driver.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Fl_Graphics_Driver.cxx') 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 #include #include +#include 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_); } -- cgit v1.2.3