diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2000-10-17 07:03:41 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2000-10-17 07:03:41 +0000 |
| commit | b56f14d91cec252018bba501376256147ae32807 (patch) | |
| tree | 0920cd9afc78cd0ce2490e352a12da71b0cc59f0 /src | |
| parent | a5d75b0fcda62406a8bbb5c2bd335f46a42ade60 (diff) | |
Fl::set_fonts() on WIN32 fixed to work before the first window is shown.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1313 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_line_style.cxx | 2 | ||||
| -rwxr-xr-x | src/fl_set_fonts_win32.cxx | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/fl_line_style.cxx b/src/fl_line_style.cxx index 5a27b216b..0d34a29f9 100644 --- a/src/fl_line_style.cxx +++ b/src/fl_line_style.cxx @@ -18,7 +18,7 @@ void fl_line_style(int style, int width, char* dashes) { s1 |= style & 0xff; // allow them to pass any low 8 bits for style } if ((style || n) && !width) width = 1; // fix cards that do nothing for 0? - static LOGBRUSH penbrush = {BS_SOLID,fl_RGB(),0}; // can this be fl_brush()? + LOGBRUSH penbrush = {BS_SOLID,fl_RGB(),0}; // can this be fl_brush()? HPEN newpen = ExtCreatePen(s1, width, &penbrush, n, n ? a : 0); if (!newpen) { // CET - FIXME - remove this debug fprintf()? diff --git a/src/fl_set_fonts_win32.cxx b/src/fl_set_fonts_win32.cxx index faff18373..f7275dff9 100755 --- a/src/fl_set_fonts_win32.cxx +++ b/src/fl_set_fonts_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_set_fonts_win32.cxx,v 1.5.2.3 2000/06/05 21:21:10 mike Exp $" +// "$Id: fl_set_fonts_win32.cxx,v 1.5.2.4 2000/10/17 07:03:41 spitzak Exp $" // // WIN32 font utilities for the Fast Light Tool Kit (FLTK). // @@ -74,8 +74,10 @@ static int CALLBACK enumcb(ENUMLOGFONT FAR *lpelf, } Fl_Font Fl::set_fonts(const char* xstarname) { - if (fl_free_font == FL_FREE_FONT) // if not already been called + if (fl_free_font == FL_FREE_FONT) {// if not already been called + if (!fl_gc) fl_GetDC(0); EnumFontFamilies(fl_gc, NULL, (FONTENUMPROC)enumcb, xstarname != 0); + } return (Fl_Font)fl_free_font; } @@ -88,5 +90,5 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) { } // -// End of "$Id: fl_set_fonts_win32.cxx,v 1.5.2.3 2000/06/05 21:21:10 mike Exp $". +// End of "$Id: fl_set_fonts_win32.cxx,v 1.5.2.4 2000/10/17 07:03:41 spitzak Exp $". // |
