From 2689cedc36960f35bcc0a87edf8de047741c64d6 Mon Sep 17 00:00:00 2001 From: Fabien Costantini Date: Sat, 17 Jan 2009 15:58:11 +0000 Subject: Fixed Mac OS X text descent would not return correct height, now multi input lines space between lines matches exactly the spacing in fltk 1.1. No more pixels eaten during drawing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6637 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_font_mac.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index 35234e0d7..a7b10f463 100644 --- a/src/fl_font_mac.cxx +++ b/src/fl_font_mac.cxx @@ -216,16 +216,20 @@ void fl_font(Fl_Font fnum, Fl_Fontsize size) { } int fl_height() { + check_default_font(); if (fl_fontsize) return fl_fontsize->ascent+fl_fontsize->descent; else return -1; } int fl_descent() { - if (fl_fontsize) return fl_fontsize->descent; + check_default_font(); + if (fl_fontsize) + return fl_fontsize->descent+1; else return -1; } double fl_width(const UniChar* txt, int n) { + check_default_font(); if (!fl_fontsize) { check_default_font(); // avoid a crash! if (!fl_fontsize) -- cgit v1.2.3