mirror of
https://github.com/fltk/fltk.git
synced 2026-05-22 07:01:34 +08:00
Make sure that font names are zeroed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2677 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
CHANGES IN FLTK 1.1.1
|
||||
|
||||
- Fl::set_font() didn't 0-initialize all font descriptor
|
||||
data.
|
||||
- Some OpenGL implementations don't support single-
|
||||
buffered visuals. The Fl_Gl_Window class now emulates
|
||||
single-buffered windows using double-buffered
|
||||
|
||||
+10
-3
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: fl_set_font.cxx,v 1.5.2.3.2.7 2002/07/01 20:14:08 easysw Exp $"
|
||||
// "$Id: fl_set_font.cxx,v 1.5.2.3.2.8 2002/10/16 23:02:49 easysw Exp $"
|
||||
//
|
||||
// Font utilities for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -47,7 +47,14 @@ void Fl::set_font(Fl_Font fnum, const char* name) {
|
||||
table_size = 2*table_size;
|
||||
fl_fonts=(Fl_Fontdesc*)realloc(fl_fonts, table_size*sizeof(Fl_Fontdesc));
|
||||
}
|
||||
for (; i < table_size; i++) fl_fonts[i].name = 0;
|
||||
for (; i < table_size; i++) {
|
||||
fl_fonts[i].fontname[0] = 0;
|
||||
fl_fonts[i].name = 0;
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
fl_fonts[i].xlist = 0;
|
||||
fl_fonts[i].n = 0;
|
||||
#endif // !WIN32 && !__APPLE__
|
||||
}
|
||||
}
|
||||
Fl_Fontdesc* s = fl_fonts+fnum;
|
||||
if (s->name) {
|
||||
@@ -74,5 +81,5 @@ void Fl::set_font(Fl_Font fnum, Fl_Font from) {
|
||||
const char* Fl::get_font(Fl_Font fnum) {return fl_fonts[fnum].name;}
|
||||
|
||||
//
|
||||
// End of "$Id: fl_set_font.cxx,v 1.5.2.3.2.7 2002/07/01 20:14:08 easysw Exp $".
|
||||
// End of "$Id: fl_set_font.cxx,v 1.5.2.3.2.8 2002/10/16 23:02:49 easysw Exp $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user