summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Browser_.cxx2
-rw-r--r--src/Fl_Choice.cxx2
-rw-r--r--src/Fl_Counter.cxx2
-rw-r--r--src/Fl_File_Chooser.cxx8
-rw-r--r--src/Fl_File_Chooser2.cxx2
-rw-r--r--src/Fl_Font.H6
-rw-r--r--src/Fl_Help_Dialog.cxx4
-rw-r--r--src/Fl_Help_Dialog.fl4
-rw-r--r--src/Fl_Help_View.cxx29
-rw-r--r--src/Fl_Input_.cxx2
-rw-r--r--src/Fl_Menu.cxx8
-rw-r--r--src/Fl_Menu_.cxx2
-rw-r--r--src/Fl_Menu_Button.cxx2
-rw-r--r--src/Fl_Text_Display.cxx2
-rw-r--r--src/Fl_Tooltip.cxx4
-rw-r--r--src/Fl_Value_Output.cxx2
-rw-r--r--src/Fl_Widget.cxx4
-rw-r--r--src/Fl_Window.cxx1
-rw-r--r--src/fl_ask.cxx4
-rw-r--r--src/fl_font_mac.cxx12
-rw-r--r--src/fl_font_win32.cxx10
-rw-r--r--src/fl_font_x.cxx8
-rw-r--r--src/fl_font_xft.cxx6
23 files changed, 65 insertions, 61 deletions
diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx
index 64beaa74a..8a4bc2714 100644
--- a/src/Fl_Browser_.cxx
+++ b/src/Fl_Browser_.cxx
@@ -803,7 +803,7 @@ Fl_Browser_::Fl_Browser_(int X, int Y, int W, int H, const char* l)
hscrollbar.callback(hscrollbar_callback);
hscrollbar.type(FL_HORIZONTAL);
textfont_ = FL_HELVETICA;
- textsize_ = (uchar)FL_NORMAL_SIZE;
+ textsize_ = FL_NORMAL_SIZE;
textcolor_ = FL_FOREGROUND_COLOR;
has_scrollbar_ = BOTH;
max_width = 0;
diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx
index f9eabde20..469658a07 100644
--- a/src/Fl_Choice.cxx
+++ b/src/Fl_Choice.cxx
@@ -91,7 +91,7 @@ void Fl_Choice::draw() {
l.image = 0;
l.deimage = 0;
l.type = m.labeltype_;
- l.font = m.labelsize_ || m.labelfont_ ? m.labelfont_ : uchar(textfont());
+ l.font = m.labelsize_ || m.labelfont_ ? m.labelfont_ : textfont();
l.size = m.labelsize_ ? m.labelsize_ : textsize();
l.color= m.labelcolor_ ? m.labelcolor_ : textcolor();
if (!m.active()) l.color = fl_inactive((Fl_Color)l.color);
diff --git a/src/Fl_Counter.cxx b/src/Fl_Counter.cxx
index 875171541..656016e42 100644
--- a/src/Fl_Counter.cxx
+++ b/src/Fl_Counter.cxx
@@ -188,7 +188,7 @@ Fl_Counter::Fl_Counter(int X, int Y, int W, int H, const char* l)
lstep_ = 1.0;
mouseobj = 0;
textfont_ = FL_HELVETICA;
- textsize_ = (uchar)FL_NORMAL_SIZE;
+ textsize_ = FL_NORMAL_SIZE;
textcolor_ = FL_FOREGROUND_COLOR;
}
diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx
index d8739dfb5..842e7f5bb 100644
--- a/src/Fl_File_Chooser.cxx
+++ b/src/Fl_File_Chooser.cxx
@@ -391,19 +391,19 @@ Fl_Color Fl_File_Chooser::textcolor() {
return (fileList->textcolor());
}
-void Fl_File_Chooser::textfont(uchar f) {
+void Fl_File_Chooser::textfont(Fl_Font f) {
fileList->textfont(f);
}
-uchar Fl_File_Chooser::textfont() {
+Fl_Font Fl_File_Chooser::textfont() {
return (fileList->textfont());
}
-void Fl_File_Chooser::textsize(uchar s) {
+void Fl_File_Chooser::textsize(Fl_Font_Size s) {
fileList->textsize(s);
}
-uchar Fl_File_Chooser::textsize() {
+Fl_Font_Size Fl_File_Chooser::textsize() {
return (fileList->textsize());
}
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index 3b0562988..44d5534ad 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -1067,7 +1067,7 @@ Fl_File_Chooser::update_preview()
previewBox->label(preview_text_);
previewBox->align((Fl_Align)(FL_ALIGN_CLIP | FL_ALIGN_INSIDE |
FL_ALIGN_LEFT | FL_ALIGN_TOP));
- previewBox->labelsize((uchar)size);
+ previewBox->labelsize(size);
previewBox->labelfont(FL_COURIER);
}
} else {
diff --git a/src/Fl_Font.H b/src/Fl_Font.H
index 841e47d53..8ba70c905 100644
--- a/src/Fl_Font.H
+++ b/src/Fl_Font.H
@@ -51,15 +51,15 @@ public:
HFONT fid;
int width[256];
TEXTMETRIC metr;
- FL_EXPORT Fl_FontSize(const char* fontname, int size);
+ FL_EXPORT Fl_FontSize(const char* fontname, Fl_Font_Size size);
# elif defined(__APPLE_QD__)
- FL_EXPORT Fl_FontSize(const char* fontname, int size);
+ FL_EXPORT Fl_FontSize(const char* fontname, Fl_Font_Size size);
short font, face, size;
short ascent, descent;
short width[256];
bool knowMetrics;
# elif defined(__APPLE_QUARTZ__)
- FL_EXPORT Fl_FontSize(const char* fontname, int size);
+ FL_EXPORT Fl_FontSize(const char* fontname, Fl_Font_Size size);
ATSUTextLayout layout;
ATSUStyle style;
short ascent, descent, q_width;
diff --git a/src/Fl_Help_Dialog.cxx b/src/Fl_Help_Dialog.cxx
index c55b5fbc6..bc48add79 100644
--- a/src/Fl_Help_Dialog.cxx
+++ b/src/Fl_Help_Dialog.cxx
@@ -244,7 +244,7 @@ void Fl_Help_Dialog::show(int argc, char **argv) {
window_->show(argc, argv);
}
-void Fl_Help_Dialog::textsize(uchar s) {
+void Fl_Help_Dialog::textsize(Fl_Font_Size s) {
view_->textsize(s);
if (s <= 8)
@@ -258,7 +258,7 @@ else
larger_->activate();
}
-uchar Fl_Help_Dialog::textsize() {
+Fl_Font_Size Fl_Help_Dialog::textsize() {
return (view_->textsize());
}
diff --git a/src/Fl_Help_Dialog.fl b/src/Fl_Help_Dialog.fl
index ddb78af6e..8293f6cbc 100644
--- a/src/Fl_Help_Dialog.fl
+++ b/src/Fl_Help_Dialog.fl
@@ -204,7 +204,7 @@ window_->label(view_->title());} {}
} {
code {window_->show(argc, argv);} {}
}
- Function {textsize(uchar s)} {return_type void
+ Function {textsize(Fl_Font_Size s)} {return_type void
} {
code {view_->textsize(s);
@@ -218,7 +218,7 @@ if (s >= 18)
else
larger_->activate();} {}
}
- Function {textsize()} {return_type uchar
+ Function {textsize()} {return_type Fl_Font_Size
} {
code {return (view_->textsize());} {}
}
diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx
index fae224401..95d5d5654 100644
--- a/src/Fl_Help_View.cxx
+++ b/src/Fl_Help_View.cxx
@@ -465,7 +465,8 @@ Fl_Help_View::draw()
attr[1024]; // Attribute buffer
int xx, yy, ww, hh; // Current positions and sizes
int line; // Current line
- unsigned char font, fsize; // Current font and size
+ Fl_Font font;
+ Fl_Font_Size fsize; // Current font and size
int head, pre, // Flags for text
needspace; // Do we need whitespace?
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
@@ -700,11 +701,11 @@ Fl_Help_View::draw()
if (tolower(buf[0]) == 'h')
{
font = FL_HELVETICA_BOLD;
- fsize = (uchar)(textsize_ + '7' - buf[1]);
+ fsize = textsize_ + '7' - buf[1];
}
else if (strcasecmp(buf, "DT") == 0)
{
- font = (uchar)(textfont_ | FL_ITALIC);
+ font = textfont_ | FL_ITALIC;
fsize = textsize_;
}
else if (strcasecmp(buf, "PRE") == 0)
@@ -1082,7 +1083,8 @@ Fl_Help_View::format()
int xx, yy, ww, hh; // Size of current text fragment
int line; // Current line in block
int links; // Links for current line
- unsigned char font, fsize; // Current font and size
+ Fl_Font font;
+ Fl_Font_Size fsize; // Current font and size
unsigned char border; // Draw border?
int talign, // Current alignment
newalign, // New alignment
@@ -1387,11 +1389,11 @@ Fl_Help_View::format()
if (tolower(buf[0]) == 'h' && isdigit(buf[1]))
{
font = FL_HELVETICA_BOLD;
- fsize = (uchar)(textsize_ + '7' - buf[1]);
+ fsize = textsize_ + '7' - buf[1];
}
else if (strcasecmp(buf, "DT") == 0)
{
- font = (uchar)(textfont_ | FL_ITALIC);
+ font = textfont_ | FL_ITALIC;
fsize = textsize_;
}
else if (strcasecmp(buf, "PRE") == 0)
@@ -1575,7 +1577,7 @@ Fl_Help_View::format()
block->h += hh;
if (strcasecmp(buf, "TH") == 0)
- font = (uchar)(textfont_ | FL_BOLD);
+ font = textfont_ | FL_BOLD;
else
font = textfont_;
@@ -1894,7 +1896,8 @@ Fl_Help_View::format_table(int *table_width, // O - Total table width
*attrs, // Pointer to attributes
*start; // Start of element
int minwidths[MAX_COLUMNS]; // Minimum widths for each column
- unsigned char font, fsize; // Current font and size
+ Fl_Font font;
+ Fl_Font_Size fsize; // Current font and size
// Clear widths...
@@ -1910,8 +1913,8 @@ Fl_Help_View::format_table(int *table_width, // O - Total table width
max_width = 0;
pre = 0;
needspace = 0;
- font = fonts_[nfonts_][0];
- fsize = fonts_[nfonts_][1];
+ font = fonts_[nfonts_];
+ fsize = font_sizes_[nfonts_];
// Scan the table...
for (ptr = table, column = -1, width = 0, s = buf, incell = 0; *ptr;)
@@ -1988,11 +1991,11 @@ Fl_Help_View::format_table(int *table_width, // O - Total table width
if (tolower(buf[0]) == 'h' && isdigit(buf[1]))
{
font = FL_HELVETICA_BOLD;
- fsize = (uchar)(textsize_ + '7' - buf[1]);
+ fsize = textsize_ + '7' - buf[1];
}
else if (strcasecmp(buf, "DT") == 0)
{
- font = (uchar)(textfont_ | FL_ITALIC);
+ font = textfont_ | FL_ITALIC;
fsize = textsize_;
}
else if (strcasecmp(buf, "PRE") == 0)
@@ -2102,7 +2105,7 @@ Fl_Help_View::format_table(int *table_width, // O - Total table width
incell = 1;
if (strcasecmp(buf, "TH") == 0)
- font = (uchar)(textfont_ | FL_BOLD);
+ font = textfont_ | FL_BOLD;
else
font = textfont_;
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index ec45d554c..2bde01c39 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -807,7 +807,7 @@ Fl_Input_::Fl_Input_(int X, int Y, int W, int H, const char* l)
box(FL_DOWN_BOX);
color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
align(FL_ALIGN_LEFT);
- textsize_ = (uchar)FL_NORMAL_SIZE;
+ textsize_ = FL_NORMAL_SIZE;
textfont_ = FL_HELVETICA;
textcolor_ = FL_FOREGROUND_COLOR;
cursor_color_ = FL_FOREGROUND_COLOR; // was FL_BLUE
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 18a847e12..eeda1bcc2 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -125,8 +125,8 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const {
l.image = 0;
l.deimage = 0;
l.type = labeltype_;
- l.font = labelsize_ || labelfont_ ? labelfont_ : uchar(m ? m->textfont() : FL_HELVETICA);
- l.size = labelsize_ ? labelsize_ : m ? m->textsize() : (uchar)FL_NORMAL_SIZE;
+ l.font = labelsize_ || labelfont_ ? labelfont_ : (m ? m->textfont() : FL_HELVETICA);
+ l.size = labelsize_ ? labelsize_ : m ? m->textsize() : FL_NORMAL_SIZE;
l.color = FL_FOREGROUND_COLOR; // this makes no difference?
fl_draw_shortcut = 1;
int w = 0; int h = 0;
@@ -143,8 +143,8 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m,
l.image = 0;
l.deimage = 0;
l.type = labeltype_;
- l.font = labelsize_ || labelfont_ ? labelfont_ : uchar(m ? m->textfont() : FL_HELVETICA);
- l.size = labelsize_ ? labelsize_ : m ? m->textsize() : (uchar)FL_NORMAL_SIZE;
+ l.font = labelsize_ || labelfont_ ? labelfont_ : (m ? m->textfont() : FL_HELVETICA);
+ l.size = labelsize_ ? labelsize_ : m ? m->textsize() : FL_NORMAL_SIZE;
l.color = labelcolor_ ? labelcolor_ : m ? m->textcolor() : int(FL_FOREGROUND_COLOR);
if (!active()) l.color = fl_inactive((Fl_Color)l.color);
Fl_Color color = m ? m->color() : FL_GRAY;
diff --git a/src/Fl_Menu_.cxx b/src/Fl_Menu_.cxx
index f5b3c61a2..1a8e12691 100644
--- a/src/Fl_Menu_.cxx
+++ b/src/Fl_Menu_.cxx
@@ -175,7 +175,7 @@ Fl_Menu_::Fl_Menu_(int X,int Y,int W,int H,const char* l)
alloc = 0;
selection_color(FL_SELECTION_COLOR);
textfont(FL_HELVETICA);
- textsize((uchar)FL_NORMAL_SIZE);
+ textsize(FL_NORMAL_SIZE);
textcolor(FL_FOREGROUND_COLOR);
down_box(FL_NO_BOX);
}
diff --git a/src/Fl_Menu_Button.cxx b/src/Fl_Menu_Button.cxx
index a3c13a829..028d29879 100644
--- a/src/Fl_Menu_Button.cxx
+++ b/src/Fl_Menu_Button.cxx
@@ -38,7 +38,7 @@ void Fl_Menu_Button::draw() {
draw_label();
if (Fl::focus() == this) draw_focus();
if (box() == FL_FLAT_BOX) return; // for XForms compatability
- int H = (labelsize()-3)&-2;
+ int H = (int(labelsize()-3))&-2;
int X = x()+w()-H*2;
int Y = y()+(h()-H)/2;
fl_color(active_r() ? FL_DARK3 : fl_inactive(FL_DARK3));
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index e0f26e01c..5a66fd1ee 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -89,7 +89,7 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l)
color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
box(FL_DOWN_FRAME);
- textsize((uchar)FL_NORMAL_SIZE);
+ textsize(FL_NORMAL_SIZE);
textcolor(FL_FOREGROUND_COLOR);
textfont(FL_HELVETICA);
set_flag(SHORTCUT_LABEL);
diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx
index bf100bd9c..24280b295 100644
--- a/src/Fl_Tooltip.cxx
+++ b/src/Fl_Tooltip.cxx
@@ -38,8 +38,8 @@ unsigned Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1,
FL_NUM_GREEN - 1,
FL_NUM_BLUE - 2);
unsigned Fl_Tooltip::textcolor_ = FL_BLACK;
-int Fl_Tooltip::font_ = FL_HELVETICA;
-int Fl_Tooltip::size_ = FL_NORMAL_SIZE;
+Fl_Font Fl_Tooltip::font_ = FL_HELVETICA;
+Fl_Font_Size Fl_Tooltip::size_ = FL_NORMAL_SIZE;
#define MAX_WIDTH 400
diff --git a/src/Fl_Value_Output.cxx b/src/Fl_Value_Output.cxx
index 6574bf106..90df41847 100644
--- a/src/Fl_Value_Output.cxx
+++ b/src/Fl_Value_Output.cxx
@@ -93,7 +93,7 @@ Fl_Value_Output::Fl_Value_Output(int X, int Y, int W, int H,const char *l)
box(FL_NO_BOX);
align(FL_ALIGN_LEFT);
textfont_ = FL_HELVETICA;
- textsize_ = (uchar)FL_NORMAL_SIZE;
+ textsize_ = FL_NORMAL_SIZE;
textcolor_ = FL_FOREGROUND_COLOR;
soft_ = 0;
}
diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx
index 9f33b2cf3..9b4c6415c 100644
--- a/src/Fl_Widget.cxx
+++ b/src/Fl_Widget.cxx
@@ -76,7 +76,7 @@ int Fl_Widget::handle(int) {
return 0;
}
-int FL_NORMAL_SIZE = 14;
+Fl_Font_Size FL_NORMAL_SIZE = 14;
Fl_Widget::Fl_Widget(int X, int Y, int W, int H, const char* L) {
@@ -87,7 +87,7 @@ Fl_Widget::Fl_Widget(int X, int Y, int W, int H, const char* L) {
label_.deimage = 0;
label_.type = FL_NORMAL_LABEL;
label_.font = FL_HELVETICA;
- label_.size = (uchar)FL_NORMAL_SIZE;
+ label_.size = FL_NORMAL_SIZE;
label_.color = FL_FOREGROUND_COLOR;
tooltip_ = 0;
callback_ = default_callback;
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index 84b3d119f..04d94aa5c 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -150,6 +150,7 @@ void Fl_Window::copy_label(const char *a) {
void Fl_Window::iconlabel(const char *iname) {
+ // FIXME: 'flags' is 32 bit large!
uchar saveflags = flags();
label(label(), iname);
set_flag(saveflags);
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx
index 753fc72c0..dbd165b1c 100644
--- a/src/fl_ask.cxx
+++ b/src/fl_ask.cxx
@@ -54,7 +54,7 @@ static Fl_Button *button[3];
static Fl_Input *input;
static const char *iconlabel = "?";
Fl_Font fl_message_font_ = FL_HELVETICA;
-uchar fl_message_size_ = 14;
+Fl_Font_Size fl_message_size_ = 14;
static Fl_Window *makeform() {
if (message_form) {
@@ -156,7 +156,7 @@ void resizeform() {
message->resize(20 + icon_size, 10, message_w, message_h);
icon->resize(10, 10, icon_size, icon_size);
- icon->labelsize((uchar)(icon_size - 10));
+ icon->labelsize(icon_size - 10);
input->resize(20 + icon_size, 10 + message_h, message_w, 25);
for (x = w, i = 0; i < 3; i ++)
diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx
index e1185ae3d..3c1151199 100644
--- a/src/fl_font_mac.cxx
+++ b/src/fl_font_mac.cxx
@@ -27,7 +27,7 @@
#include <config.h>
-Fl_FontSize::Fl_FontSize(const char* name, int Size) {
+Fl_FontSize::Fl_FontSize(const char* name, Fl_Font_Size Size) {
next = 0;
# if HAVE_GL
listbase = 0;
@@ -83,7 +83,7 @@ Fl_FontSize::Fl_FontSize(const char* name, int Size) {
// now set the actual font, size and attributes. We also set the font matrix to
// render our font up-side-down, so when rendered through our inverted CGContext,
// text will appear normal again.
- Fixed fsize = IntToFixed(Size);
+ Fixed fsize = FloatToFixed(Size);
ATSUFontID fontID = FMGetFontFromATSFontRef(font);
static CGAffineTransform font_mx = { 1, 0, 0, -1, 0, 0 };
ATSUAttributeTag sTag[] = { kATSUFontTag, kATSUSizeTag, kATSUFontMatrixTag };
@@ -245,7 +245,7 @@ void fl_font(Fl_FontSize* s) {
#endif
}
-static Fl_FontSize* find(int fnum, int size) {
+static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
Fl_Fontdesc* s = fl_fonts+fnum;
if (!s->name) s = fl_fonts; // use 0 if fnum undefined
Fl_FontSize* f;
@@ -260,10 +260,10 @@ static Fl_FontSize* find(int fnum, int size) {
////////////////////////////////////////////////////////////////
// Public interface:
-int fl_font_ = 0;
-int fl_size_ = 0;
+Fl_Font fl_font_ = 0;
+Fl_Font_Size fl_size_ = 0;
-void fl_font(int fnum, int size) {
+void fl_font(Fl_Font fnum, Fl_Font_Size size) {
if (fnum==-1) {
fl_font_ = 0;
fl_size_ = 0;
diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx
index 7f42f3eb9..102d914db 100644
--- a/src/fl_font_win32.cxx
+++ b/src/fl_font_win32.cxx
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php
//
-Fl_FontSize::Fl_FontSize(const char* name, int size) {
+Fl_FontSize::Fl_FontSize(const char* name, Fl_Font_Size size) {
int weight = FW_NORMAL;
int italic = 0;
switch (*name++) {
@@ -106,7 +106,7 @@ static Fl_Fontdesc built_in_table[] = {
Fl_Fontdesc* fl_fonts = built_in_table;
-static Fl_FontSize* find(int fnum, int size) {
+static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
Fl_Fontdesc* s = fl_fonts+fnum;
if (!s->name) s = fl_fonts; // use 0 if fnum undefined
Fl_FontSize* f;
@@ -121,11 +121,11 @@ static Fl_FontSize* find(int fnum, int size) {
////////////////////////////////////////////////////////////////
// Public interface:
-int fl_font_ = 0;
-int fl_size_ = 0;
+Fl_Font fl_font_ = 0;
+Fl_Font_Size fl_size_ = 0;
//static HDC font_gc;
-void fl_font(int fnum, int size) {
+void fl_font(Fl_Font fnum, Fl_Font_Size size) {
if (fnum==-1) { // just make sure that we will load a new font next time
fl_font_ = 0; fl_size_ = 0;
return;
diff --git a/src/fl_font_x.cxx b/src/fl_font_x.cxx
index 9d3b0c639..ee1c12ec8 100644
--- a/src/fl_font_x.cxx
+++ b/src/fl_font_x.cxx
@@ -113,7 +113,7 @@ int fl_correct_encoding(const char* name) {
}
// locate or create an Fl_FontSize for a given Fl_Fontdesc and size:
-static Fl_FontSize* find(int fnum, int size) {
+static Fl_FontSize* find(Fl_Font fnum, Fl_Font_Size size) {
Fl_Fontdesc* s = fl_fonts+fnum;
if (!s->name) s = fl_fonts; // use font 0 if still undefined
Fl_FontSize* f;
@@ -193,13 +193,13 @@ static Fl_FontSize* find(int fnum, int size) {
////////////////////////////////////////////////////////////////
// Public interface:
-int fl_font_ = 0;
-int fl_size_ = 0;
+Fl_Font fl_font_ = 0;
+Fl_Font_Size fl_size_ = 0;
XFontStruct* fl_xfont = 0;
void *fl_xftfont = 0;
static GC font_gc;
-void fl_font(int fnum, int size) {
+void fl_font(Fl_Font fnum, Fl_Font_Size size) {
if (fnum==-1) {
fl_font_ = 0; fl_size_ = 0;
return;
diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx
index cf1116843..2ded22247 100644
--- a/src/fl_font_xft.cxx
+++ b/src/fl_font_xft.cxx
@@ -88,14 +88,14 @@ Fl_Fontdesc* fl_fonts = built_in_table;
#define current_font (fl_fontsize->font)
-int fl_font_ = 0;
-int fl_size_ = 0;
+Fl_Font fl_font_ = 0;
+Fl_Font_Size fl_size_ = 0;
XFontStruct* fl_xfont = 0;
void *fl_xftfont = 0;
const char* fl_encoding_ = "iso8859-1";
Fl_FontSize* fl_fontsize = 0;
-void fl_font(int fnum, int size) {
+void fl_font(Fl_Font fnum, Fl_Font_Size size) {
if (fnum==-1) { // special case to stop font caching
fl_font_ = 0; fl_size_ = 0;
return;