diff options
| author | Manolo Gouy <Manolo> | 2016-09-23 13:56:07 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-09-23 13:56:07 +0000 |
| commit | 0250c5a98af506f2f107f8bd2e9e2c2c87a10c10 (patch) | |
| tree | 161771fa546b05f2d7fad1f5d67d831e00c6425c /src/fl_set_font.cxx | |
| parent | 63e33b1be3e2af253cd8adf10a5eac7e72a5fc7e (diff) | |
Move font-related member functions from Fl_Screen_Driver to Fl_Graphics_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_set_font.cxx')
| -rw-r--r-- | src/fl_set_font.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fl_set_font.cxx b/src/fl_set_font.cxx index d2e61ae67..2091aa00e 100644 --- a/src/fl_set_font.cxx +++ b/src/fl_set_font.cxx @@ -35,8 +35,9 @@ static int table_size; the string is not copied, so the string must be in static memory. */ void Fl::set_font(Fl_Font fnum, const char* name) { - unsigned width = Fl::screen_driver()->font_desc_size(); - if (!fl_fonts) fl_fonts = Fl::screen_driver()->calc_fl_fonts(); + Fl_Graphics_Driver &d = Fl_Graphics_Driver::default_driver(); + unsigned width = d.font_desc_size(); + if (!fl_fonts) fl_fonts = d.calc_fl_fonts(); while (fnum >= table_size) { int i = table_size; if (!i) { // don't realloc the built-in table @@ -53,8 +54,8 @@ void Fl::set_font(Fl_Font fnum, const char* name) { memset((char*)fl_fonts + i * width, 0, width); } } - Fl::screen_driver()->font_name(fnum, name); - Fl_Display_Device::display_device()->driver()->font(-1, 0); + d.font_name(fnum, name); + d.font(-1, 0); } /** Copies one face to another. */ @@ -68,7 +69,7 @@ void Fl::set_font(Fl_Font fnum, Fl_Font from) { of this face. */ const char* Fl::get_font(Fl_Font fnum) { - return Fl::screen_driver()->font_name(fnum); + return Fl_Graphics_Driver::default_driver().font_name(fnum); } // |
