natFont.cc (getAscent): Correctly access "ascent" field.

* gnu/gcj/xlib/natFont.cc (getAscent): Correctly access "ascent"
	field.
	(getDescent): Likewise, for "descent".

From-SVN: r67695
This commit is contained in:
Tom Tromey
2003-06-10 02:45:07 +00:00
committed by Tom Tromey
parent 619833ad03
commit 4982b6384a
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ jint gnu::gcj::xlib::Font::getAscent()
if (fontStruct->min_byte1==0 && fontStruct->min_char_or_byte2<=(unsigned)'O')
returnValue = fontStruct
->per_char[(unsigned)'O'-fontStruct->min_char_or_byte2]
->ascent;
.ascent;
return returnValue+1; // +1 to include the baseline
}
@@ -71,7 +71,7 @@ jint gnu::gcj::xlib::Font::getDescent()
if (fontStruct->min_byte1==0 && fontStruct->min_char_or_byte2<=(unsigned)'y')
returnValue = fontStruct
->per_char[(unsigned)'y'-fontStruct->min_char_or_byte2]
->descent;
.descent;
return returnValue-1; // -1 to exclude the baseline
}