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
This commit is contained in:
Fabien Costantini 2009-01-17 15:58:11 +00:00
parent 0836f376e5
commit 2689cedc36
1 changed files with 5 additions and 1 deletions

View File

@ -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)