summaryrefslogtreecommitdiff
path: root/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-09-22 07:44:34 +0000
committerManolo Gouy <Manolo>2016-09-22 07:44:34 +0000
commit02535d122296b00a99fa30e0253f83c82f177894 (patch)
treefa232bb98a668be9a3b51e4f6c77c230a4ae9cf0 /src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
parent145cca26bda55a98adc8c85bea5152e9c3834392 (diff)
Rewrite Fl::set_fonts(), Fl::get_font_sizes(), Fl::get_font_name() under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11965 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
index 3f1b31223..495ceb858 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
@@ -37,6 +37,7 @@
// Select fonts from the FLTK font table.
#include "Fl_GDI_Graphics_Driver.H"
+#include "../WinAPI/Fl_WinAPI_Screen_Driver.H"
#include "../../flstring.h"
#include <FL/Fl.H>
#include <FL/fl_draw.H>
@@ -62,7 +63,7 @@
#define ENDOFBUFFER 127 // sizeof(Fl_Font.fontname)-1
// turn a stored font name into a pretty name:
-const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
+const char* Fl_WinAPI_Screen_Driver::get_font_name(Fl_Font fnum, int* ap) {
Fl_Fontdesc *f = fl_fonts + fnum;
if (!f->fontname[0]) {
const char* p = f->name;
@@ -112,7 +113,7 @@ enumcbw(CONST LOGFONTW *lpelf,
return 1;
} /* enumcbw */
-Fl_Font Fl::set_fonts(const char* xstarname) {
+Fl_Font Fl_WinAPI_Screen_Driver::set_fonts(const char* xstarname) {
HDC gc = (HDC)fl_graphics_driver->gc();
if (fl_free_font == FL_FREE_FONT) {// if not already been called
if (!gc) gc = fl_GetDC(0);
@@ -163,8 +164,7 @@ EnumSizeCbW(CONST LOGFONTW * /*lpelf*/,
}
-int
-Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
+int Fl_WinAPI_Screen_Driver::get_font_sizes(Fl_Font fnum, int*& sizep) {
nbSize = 0;
Fl_Fontdesc *s = fl_fonts+fnum;
if (!s->name) s = fl_fonts; // empty slot in table, use entry 0