PATCH: xlib fix FontMetrics problems
Tom Tromey
tromey@redhat.com
Tue Jun 10 02:44:00 GMT 2003
Scott> * gnu/gcj/xlib/natFont.cc (getMaxAscent): adjusted return value.
Scott> (getMaxDescent): adjusted return value.
Scott> (getAscent): modified to use metrics for 'O'.
Scott> (getDescent): modified to use metrics for 'y'.
This didn't compile. I'm checking in the appended to bring it back
into compiling state.
Tom
Index: libjava/ChangeLog
from Tom Tromey <tromey@redhat.com>
* gnu/gcj/xlib/natFont.cc (getAscent): Correctly access "ascent"
field.
(getDescent): Likewise, for "descent".
Index: libjava/gnu/gcj/xlib/natFont.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/gcj/xlib/natFont.cc,v
retrieving revision 1.4
diff -u -r1.4 natFont.cc
--- libjava/gnu/gcj/xlib/natFont.cc 10 Jun 2003 01:50:12 -0000 1.4
+++ libjava/gnu/gcj/xlib/natFont.cc 10 Jun 2003 02:42:25 -0000
@@ -60,7 +60,7 @@
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 @@
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
}
More information about the Java-patches
mailing list