summaryrefslogtreecommitdiff
path: root/src/Fl_Device.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-12-13 13:24:17 +0000
committerManolo Gouy <Manolo>2015-12-13 13:24:17 +0000
commit291cf838bf15eb55aadb828738eba7ed400a72a4 (patch)
treeb3ebd813505326d06346e84fac3228d5db876bf0 /src/Fl_Device.cxx
parent69644d4032d98f4bd04fa6d7807f6a4564a46ac0 (diff)
Allowing to use FLTK objects in static initializers (cont'd).
Mac OS: a more convenient position where to initialize the fl_fonts global variable. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10964 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Device.cxx')
-rw-r--r--src/Fl_Device.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx
index 40562c7de..080ad7761 100644
--- a/src/Fl_Device.cxx
+++ b/src/Fl_Device.cxx
@@ -76,6 +76,9 @@ void Fl_Graphics_Driver::text_extents(const char*t, int n, int& dx, int& dy, int
/** A constructor that sets the graphics driver used by the display */
Fl_Display_Device::Fl_Display_Device(Fl_Graphics_Driver *graphics_driver) : Fl_Surface_Device(graphics_driver) {
this->set_current();
+#ifdef __APPLE__
+ if (!fl_fonts) fl_fonts = Fl_X::calc_fl_fonts(); // make sure fl_fonts is initialized
+#endif
};