diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-06-08 13:07:19 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-06-08 13:07:19 +0000 |
| commit | be16fa30279cf6c3147536252943e686f1d7a070 (patch) | |
| tree | cfece2eb36b8e771d3b07dcc333ca0b034e196fe /src | |
| parent | 5d7f42585b49d75e99b6f12bcb4011148a8a4b47 (diff) | |
Make sure fl_size_, fl_font_, and fl_xfont are initialized and used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2297 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_font_mac.cxx | 9 | ||||
| -rw-r--r-- | src/fl_font_win32.cxx | 8 | ||||
| -rw-r--r-- | src/fl_font_x.cxx | 10 | ||||
| -rw-r--r-- | src/fl_font_xft.cxx | 12 |
4 files changed, 20 insertions, 19 deletions
diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index 69612c1eb..316d56940 100644 --- a/src/fl_font_mac.cxx +++ b/src/fl_font_mac.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_font_mac.cxx,v 1.1.2.6 2002/06/07 19:55:44 easysw Exp $" +// "$Id: fl_font_mac.cxx,v 1.1.2.7 2002/06/08 13:07:19 easysw Exp $" // // MacOS font selection routines for the Fast Light Tool Kit (FLTK). // @@ -125,10 +125,11 @@ static Fl_FontSize* find(int fnum, int size) { //////////////////////////////////////////////////////////////// // Public interface: -int fl_font_; -int fl_size_; +int fl_font_ = 0; +int fl_size_ = 0; void fl_font(int fnum, int size) { + if (fnum == fl_font_ && size == fl_size_) return; fl_font(find(fnum, size)); } @@ -154,5 +155,5 @@ void fl_draw(const char* str, int n, int x, int y) { } // -// End of "$Id: fl_font_mac.cxx,v 1.1.2.6 2002/06/07 19:55:44 easysw Exp $". +// End of "$Id: fl_font_mac.cxx,v 1.1.2.7 2002/06/08 13:07:19 easysw Exp $". // diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx index 11decaf94..4e86a081d 100644 --- a/src/fl_font_win32.cxx +++ b/src/fl_font_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_font_win32.cxx,v 1.9.2.3.2.3 2002/03/06 18:11:01 easysw Exp $" +// "$Id: fl_font_win32.cxx,v 1.9.2.3.2.4 2002/06/08 13:07:19 easysw Exp $" // // WIN32 font selection routines for the Fast Light Tool Kit (FLTK). // @@ -119,8 +119,8 @@ static Fl_FontSize* find(int fnum, int size) { //////////////////////////////////////////////////////////////// // Public interface: -int fl_font_; -int fl_size_; +int fl_font_ = 0; +int fl_size_ = 0; //static HDC font_gc; void fl_font(int fnum, int size) { @@ -156,5 +156,5 @@ void fl_draw(const char* str, int n, int x, int y) { // -// End of "$Id: fl_font_win32.cxx,v 1.9.2.3.2.3 2002/03/06 18:11:01 easysw Exp $". +// End of "$Id: fl_font_win32.cxx,v 1.9.2.3.2.4 2002/06/08 13:07:19 easysw Exp $". // diff --git a/src/fl_font_x.cxx b/src/fl_font_x.cxx index 139b82312..798ed9fa5 100644 --- a/src/fl_font_x.cxx +++ b/src/fl_font_x.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_font_x.cxx,v 1.10.2.2 2002/03/06 19:42:30 easysw Exp $" +// "$Id: fl_font_x.cxx,v 1.10.2.3 2002/06/08 13:07:19 easysw Exp $" // // Standard X11 font selection code for the Fast Light Tool Kit (FLTK). // @@ -191,9 +191,9 @@ static Fl_FontSize* find(int fnum, int size) { //////////////////////////////////////////////////////////////// // Public interface: -int fl_font_; -int fl_size_; -XFontStruct* fl_xfont; +int fl_font_ = 0; +int fl_size_ = 0; +XFontStruct* fl_xfont = 0; static GC font_gc; void fl_font(int fnum, int size) { @@ -250,5 +250,5 @@ void fl_draw(const char* str, int n, int x, int y) { } // -// End of "$Id: fl_font_x.cxx,v 1.10.2.2 2002/03/06 19:42:30 easysw Exp $". +// End of "$Id: fl_font_x.cxx,v 1.10.2.3 2002/06/08 13:07:19 easysw Exp $". // diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx index fb62654cd..1fa30cff5 100644 --- a/src/fl_font_xft.cxx +++ b/src/fl_font_xft.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_font_xft.cxx,v 1.4.2.6 2002/05/16 02:16:17 easysw Exp $" +// "$Id: fl_font_xft.cxx,v 1.4.2.7 2002/06/08 13:07:19 easysw Exp $" // // Xft font code for the Fast Light Tool Kit (FLTK). // @@ -86,11 +86,11 @@ Fl_Fontdesc* fl_fonts = built_in_table; #define current_font (fl_fontsize->font) -int fl_font_; -int fl_size_; -XFontStruct* fl_xfont; +int fl_font_ = 0; +int fl_size_ = 0; +XFontStruct* fl_xfont = 0; const char* fl_encoding_ = "iso8859-1"; -Fl_FontSize* fl_fontsize; +Fl_FontSize* fl_fontsize = 0; void fl_font(int fnum, int size) { if (fnum == fl_font_ && size == fl_size_ && @@ -226,5 +226,5 @@ void fl_draw(const char *str, int n, int x, int y) { } // -// End of "$Id: fl_font_xft.cxx,v 1.4.2.6 2002/05/16 02:16:17 easysw Exp $" +// End of "$Id: fl_font_xft.cxx,v 1.4.2.7 2002/06/08 13:07:19 easysw Exp $" // |
