diff options
| author | Fabien Costantini <fabien@onepost.net> | 2009-01-17 15:58:11 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2009-01-17 15:58:11 +0000 |
| commit | 2689cedc36960f35bcc0a87edf8de047741c64d6 (patch) | |
| tree | fe2c3f1b333565ab57e76470653838ba6836e441 /src | |
| parent | 0836f376e5aa1991b4339b914f398411c9f7ec5a (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_font_mac.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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) |
