mirror of https://github.com/fltk/fltk
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:
parent
0836f376e5
commit
2689cedc36
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue