summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/GDI')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx9
1 files changed, 5 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 1e2b492f3..3371c4e08 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
@@ -41,6 +41,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <FL/fl_string.h>
// This function fills in the FLTK font table with all the fonts that
// are found on the X server. It tries to place the fonts into families
@@ -98,12 +99,12 @@ enumcbw(CONST LOGFONTW *lpelf,
if (!strcmp(Fl::get_font_name((Fl_Font)i),n)) {free(n);return 1;}
char buffer[LF_FACESIZE + 1];
strcpy(buffer+1, n);
- buffer[0] = ' '; Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
+ buffer[0] = ' '; Fl::set_font((Fl_Font)(fl_free_font++), fl_strdup(buffer));
if (lpelf->lfWeight <= 400)
- buffer[0] = 'B', Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
- buffer[0] = 'I'; Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
+ buffer[0] = 'B', Fl::set_font((Fl_Font)(fl_free_font++), fl_strdup(buffer));
+ buffer[0] = 'I'; Fl::set_font((Fl_Font)(fl_free_font++), fl_strdup(buffer));
if (lpelf->lfWeight <= 400)
- buffer[0] = 'P', Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
+ buffer[0] = 'P', Fl::set_font((Fl_Font)(fl_free_font++), fl_strdup(buffer));
free(n);
return 1;
} /* enumcbw */