From a8b58dc223afc42c36a551ae6d6992e6bb02b2c7 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 7 Sep 2004 20:59:18 +0000 Subject: Documentation updates (STR #505, STR #513) The old source file "fl_set_gray.cxx" is not needed (STR #516) Fl_Text_Display still called delete[] instead of free() in one place (STR #503) Fl_File_Chooser didn't correctly call isprint() and isspace() when checking to see if the current file was text that can be previewed (STR #517) FLUID didn't compile with Borland C++ due to a compiler bug (STR #496) Fl_Positioner did not handle reversed min and max values (STR #510) fl_descent(), fl_height(), and fl_width() would crash a program if you didn't call fl_font() first; they now return -1 if no font is set (STR #500) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3805 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_font_mac.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/fl_font_mac.cxx') diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index 613df6ec4..0fc0f3a8e 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.19 2004/08/27 20:02:45 matthiaswm Exp $" +// "$Id: fl_font_mac.cxx,v 1.1.2.20 2004/09/07 20:59:17 easysw Exp $" // // MacOS font selection routines for the Fast Light Tool Kit (FLTK). // @@ -163,11 +163,13 @@ void fl_font(int fnum, int size) { } int fl_height() { - return fl_fontsize->ascent+fl_fontsize->descent; + if (fl_fontsize) return fl_fontsize->ascent+fl_fontsize->descent; + else return -1; } int fl_descent() { - return fl_fontsize->descent; + if (fl_fontsize) return fl_fontsize->descent; + else return -1; } double fl_width(const char* c, int n) { @@ -226,5 +228,5 @@ void fl_draw(const char* str, int n, int x, int y) { // -// End of "$Id: fl_font_mac.cxx,v 1.1.2.19 2004/08/27 20:02:45 matthiaswm Exp $". +// End of "$Id: fl_font_mac.cxx,v 1.1.2.20 2004/09/07 20:59:17 easysw Exp $". // -- cgit v1.2.3