| 992 | |
| 993 | |
| 994 | protected void readHeader(DataInputStream is) throws IOException { |
| 995 | value = is.readInt(); |
| 996 | height = is.readInt(); |
| 997 | width = is.readInt(); |
| 998 | setWidth = is.readInt(); |
| 999 | topExtent = is.readInt(); |
| 1000 | leftExtent = is.readInt(); |
| 1001 | |
| 1002 | // pointer from a struct in the c version, ignored |
| 1003 | is.readInt(); |
| 1004 | |
| 1005 | // the values for getAscent() and getDescent() from FontMetrics |
| 1006 | // seem to be way too large.. perhaps they're the max? |
| 1007 | // as such, use a more traditional marker for ascent/descent |
| 1008 | if (value == 'd') { |
| 1009 | if (ascent == 0) ascent = topExtent; |
| 1010 | } |
| 1011 | if (value == 'p') { |
| 1012 | if (descent == 0) descent = -topExtent + height; |
| 1013 | } |
| 1014 | } |
| 1015 | |
| 1016 | |
| 1017 | protected void writeHeader(DataOutputStream os) throws IOException { |