Skip to content

Commit

Permalink
Make sure the scaling factor has been initialised when setting a font.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12248 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Jun 2, 2017
1 parent 12fd934 commit 37bcc74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Fl_Graphics_Driver.cxx
Expand Up @@ -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

Expand Down Expand Up @@ -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_);
}

Expand Down

0 comments on commit 37bcc74

Please sign in to comment.