aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-06-10 02:45:07 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-06-10 02:45:07 +0000
commit4982b6384adffe54c33ee0f5a15ba2cd3482f1f7 (patch)
tree1e2ec5b9b01f1f3a100e2d70c3e39fd8cf79f0d7
parent619833ad035bd529c64174f26e3edd7afb117268 (diff)
downloadgcc-4982b6384adffe54c33ee0f5a15ba2cd3482f1f7.zip
gcc-4982b6384adffe54c33ee0f5a15ba2cd3482f1f7.tar.gz
gcc-4982b6384adffe54c33ee0f5a15ba2cd3482f1f7.tar.bz2
natFont.cc (getAscent): Correctly access "ascent" field.
* gnu/gcj/xlib/natFont.cc (getAscent): Correctly access "ascent" field. (getDescent): Likewise, for "descent". From-SVN: r67695
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/gnu/gcj/xlib/natFont.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 3fdf18f..88b59f0 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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.
diff --git a/libjava/gnu/gcj/xlib/natFont.cc b/libjava/gnu/gcj/xlib/natFont.cc
index c929d22..54ac655 100644
--- a/libjava/gnu/gcj/xlib/natFont.cc
+++ b/libjava/gnu/gcj/xlib/natFont.cc
@@ -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
}