summaryrefslogtreecommitdiff
path: root/src/fl_set_font.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-12-02 15:51:38 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-12-02 15:51:38 +0000
commitbeb210d4d4ea2550fcc9de5a610b8fe6d9afc631 (patch)
treef792a964cfdc82e9de4fd838be0c58282eefbbd5 /src/fl_set_font.cxx
parentc061230dc7ba0d14dcfa96dedb59f34f6a16d378 (diff)
Font changes from Bill.
git-svn-id: file:///fltk/svn/fltk/trunk@109 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_set_font.cxx')
-rw-r--r--src/fl_set_font.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/fl_set_font.cxx b/src/fl_set_font.cxx
index a720b1a5a..5da1fb4ed 100644
--- a/src/fl_set_font.cxx
+++ b/src/fl_set_font.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_set_font.cxx,v 1.3 1998/10/21 14:20:58 mike Exp $"
+// "$Id: fl_set_font.cxx,v 1.4 1998/12/02 15:51:36 mike Exp $"
//
// Font utilities for the Fast Light Tool Kit (FLTK).
//
@@ -35,13 +35,13 @@
static int table_size;
-void Fl::set_font(Fl_Font fnum, const char *name) {
+void Fl::set_font(Fl_Font fnum, const char* name) {
if (fnum >= table_size) {
int i = table_size;
if (!i) { // don't realloc the built-in table
table_size = 2*FL_FREE_FONT;
i = FL_FREE_FONT;
- Fl_Fontdesc *t = (Fl_Fontdesc*)malloc(table_size*sizeof(Fl_Fontdesc));
+ Fl_Fontdesc* t = (Fl_Fontdesc*)malloc(table_size*sizeof(Fl_Fontdesc));
memcpy(t, fl_fonts, FL_FREE_FONT*sizeof(Fl_Fontdesc));
fl_fonts = t;
} else {
@@ -50,17 +50,14 @@ void Fl::set_font(Fl_Font fnum, const char *name) {
}
for (; i < table_size; i++) fl_fonts[i].name = 0;
}
- Fl_Fontdesc *s = fl_fonts+fnum;
+ Fl_Fontdesc* s = fl_fonts+fnum;
if (s->name) {
if (!strcmp(s->name, name)) {s->name = name; return;}
#ifndef WIN32
if (s->xlist && s->n >= 0) XFreeFontNames(s->xlist);
#endif
- for (Fl_XFont *f = s->first; f;) {
-#ifndef WIN32
- if (f == fl_fixed_xfont) break;
-#endif
- Fl_XFont *n = f->next; delete f; f = n;
+ for (Fl_FontSize* f = s->first; f;) {
+ Fl_FontSize* n = f->next; delete f; f = n;
}
s->first = 0;
}
@@ -71,8 +68,8 @@ void Fl::set_font(Fl_Font fnum, const char *name) {
s->first = 0;
}
-const char *Fl::get_font(Fl_Font fnum) {return fl_fonts[fnum].name;}
+const char* Fl::get_font(Fl_Font fnum) {return fl_fonts[fnum].name;}
//
-// End of "$Id: fl_set_font.cxx,v 1.3 1998/10/21 14:20:58 mike Exp $".
+// End of "$Id: fl_set_font.cxx,v 1.4 1998/12/02 15:51:36 mike Exp $".
//