| 979 | |
| 980 | |
| 981 | protected void readHeader(DataInputStream is) throws IOException { |
| 982 | value = is.readInt(); |
| 983 | height = is.readInt(); |
| 984 | width = is.readInt(); |
| 985 | setWidth = is.readInt(); |
| 986 | topExtent = is.readInt(); |
| 987 | leftExtent = is.readInt(); |
| 988 | |
| 989 | // pointer from a struct in the c version, ignored |
| 990 | is.readInt(); |
| 991 | |
| 992 | // the values for getAscent() and getDescent() from FontMetrics |
| 993 | // seem to be way too large.. perhaps they're the max? |
| 994 | // as such, use a more traditional marker for ascent/descent |
| 995 | if (value == 'd') { |
| 996 | if (ascent == 0) ascent = topExtent; |
| 997 | } |
| 998 | if (value == 'p') { |
| 999 | if (descent == 0) descent = -topExtent + height; |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | |
| 1004 | protected void writeHeader(DataOutputStream os) throws IOException { |