summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-12-02 15:53:22 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-12-02 15:53:22 +0000
commit00422021c102c3134c2dc9d6a36b3117409089fa (patch)
tree8e4d20a26388898db685f9c4ae103a634adef7ad /src
parent2af9c8eba6ccb501c32999073fd230c7199c2845 (diff)
More font magic from Bill.
git-svn-id: file:///fltk/svn/fltk/trunk@111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_font.cxx12
-rw-r--r--src/fl_font_win32.cxx22
2 files changed, 17 insertions, 17 deletions
diff --git a/src/fl_font.cxx b/src/fl_font.cxx
index 8fa805f8f..09917a28c 100644
--- a/src/fl_font.cxx
+++ b/src/fl_font.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_font.cxx,v 1.5 1998/12/02 15:51:35 mike Exp $"
+// "$Id: fl_font.cxx,v 1.6 1998/12/02 15:53:22 mike Exp $"
//
// Font selection code for the Fast Light Tool Kit (FLTK).
//
@@ -50,7 +50,7 @@ Fl_FontSize::Fl_FontSize(const char* name) {
#endif
}
-Fl_FontSize* fl_current_xfont;
+Fl_FontSize* fl_fontsize;
Fl_FontSize::~Fl_FontSize() {
#if HAVE_GL
@@ -64,7 +64,7 @@ Fl_FontSize::~Fl_FontSize() {
// glDeleteLists(listbase+base,size);
// }
#endif
- if (this == fl_current_xfont) fl_current_xfont = 0;
+ if (this == fl_fontsize) fl_fontsize = 0;
XFreeFont(fl_display, font);
}
@@ -223,8 +223,8 @@ void fl_font(int fnum, int size) {
if (fnum == fl_font_ && size == fl_size_) return;
fl_font_ = fnum; fl_size_ = size;
Fl_FontSize* f = find(fnum, size);
- if (f != fl_current_xfont) {
- fl_current_xfont = f;
+ if (f != fl_fontsize) {
+ fl_fontsize = f;
fl_xfont = f->font;
font_gc = 0;
}
@@ -292,5 +292,5 @@ void fl_draw(const char* str, int x, int y) {
#endif
//
-// End of "$Id: fl_font.cxx,v 1.5 1998/12/02 15:51:35 mike Exp $".
+// End of "$Id: fl_font.cxx,v 1.6 1998/12/02 15:53:22 mike Exp $".
//
diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx
index 8138b069e..05d19e509 100644
--- a/src/fl_font_win32.cxx
+++ b/src/fl_font_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_font_win32.cxx,v 1.7 1998/12/02 15:51:36 mike Exp $"
+// "$Id: fl_font_win32.cxx,v 1.8 1998/12/02 15:53:22 mike Exp $"
//
// WIN32 font selection routines for the Fast Light Tool Kit (FLTK).
//
@@ -71,7 +71,7 @@ Fl_FontSize::Fl_FontSize(const char* name, int size) {
minsize = maxsize = size;
}
-Fl_FontSize* fl_current_xfont;
+Fl_FontSize* fl_fontsize;
Fl_FontSize::~Fl_FontSize() {
#if HAVE_GL
@@ -85,7 +85,7 @@ Fl_FontSize::~Fl_FontSize() {
// glDeleteLists(listbase+base,size);
// }
#endif
- if (this == fl_current_xfont) fl_current_xfont = 0;
+ if (this == fl_fontsize) fl_fontsize = 0;
DeleteObject(fid);
}
@@ -136,36 +136,36 @@ int fl_size_;
void fl_font(int fnum, int size) {
if (fnum == fl_font_ && size == fl_size_) return;
fl_font_ = fnum; fl_size_ = size;
- fl_current_xfont = find(fnum, size);
+ fl_fontsize = find(fnum, size);
}
int fl_height() {
- return (fl_current_xfont->metr.tmAscent + fl_current_xfont->metr.tmDescent);
+ return (fl_fontsize->metr.tmAscent + fl_fontsize->metr.tmDescent);
}
int fl_descent() {
- return fl_current_xfont->metr.tmDescent;
+ return fl_fontsize->metr.tmDescent;
}
double fl_width(const char* c) {
double w = 0.0;
- while (*c) w += fl_current_xfont->width[uchar(*c++)];
+ while (*c) w += fl_fontsize->width[uchar(*c++)];
return w;
}
double fl_width(const char* c, int n) {
double w = 0.0;
- while (n--) w += fl_current_xfont->width[uchar(*c++)];
+ while (n--) w += fl_fontsize->width[uchar(*c++)];
return w;
}
double fl_width(uchar c) {
- return fl_current_xfont->width[c];
+ return fl_fontsize->width[c];
}
void fl_draw(const char* str, int n, int x, int y) {
SetTextColor(fl_gc, fl_RGB());
- SelectObject(fl_gc, fl_current_xfont->fid);
+ SelectObject(fl_gc, fl_fontsize->fid);
TextOut(fl_gc, x, y, str, n);
}
@@ -174,5 +174,5 @@ void fl_draw(const char* str, int x, int y) {
}
//
-// End of "$Id: fl_font_win32.cxx,v 1.7 1998/12/02 15:51:36 mike Exp $".
+// End of "$Id: fl_font_win32.cxx,v 1.8 1998/12/02 15:53:22 mike Exp $".
//