mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
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
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include <FL/Fl_Image_Surface.H>
|
#include <FL/Fl_Image_Surface.H>
|
||||||
#include <FL/math.h>
|
#include <FL/math.h>
|
||||||
|
#include <FL/x.H>
|
||||||
|
|
||||||
FL_EXPORT Fl_Graphics_Driver *fl_graphics_driver; // the current driver of graphics operations
|
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) {
|
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_);
|
font_unscaled(face, size * scale_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user