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

View file

@ -1,3 +1,9 @@
2003-06-09 Tom Tromey <tromey@redhat.com>
* gnu/gcj/xlib/natFont.cc (getAscent): Correctly access "ascent"
field.
(getDescent): Likewise, for "descent".
2003-06-09 Scott Gilbertson <scottg@mantatest.com>
* gnu/gcj/xlib/natFont.cc (getMaxAscent): adjusted return value.

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
}