private void parseFont(String baseFont) throws IOException {
        // load the base fonts properties files, if it isn't already loaded
        if (props == null) {
            props = new Properties();
            props.load(BuiltinFont.class.getResourceAsStream("res/BaseFonts.properties"));
        }

        // make sure we're a known font
        if (!props.containsKey(baseFont + ".file")) {
            throw new IllegalArgumentException("Unknown Base Font: " + baseFont);
        }

        // get the font information from the properties file
        String file = props.getProperty(baseFont + ".file");

        // the size of the file
        int length = Integer.parseInt(props.getProperty(baseFont + ".length"));
        // the size of the unencrypted portion
        int length1 = 0;
        // the size of the encrypted portion
        int length2 = 0;

        // read the data from the file
        byte[] data = new byte[length];
        InputStream fontStream = NativeFont.class.getResourceAsStream("res/" + file);
        int cur = 0;
        while (cur < length) {
            cur += fontStream.read(data, cur, length - cur);
        }
        fontStream.close();

        // are we a pfb file?
        if ((data[0] & 0xff) == 0x80) {
            // read lengths from the file
            length1 = (data[2] & 0xff);
            length1 |= (data[3] & 0xff) << 8;
            length1 |= (data[4] & 0xff) << 16;
            length1 |= (data[5] & 0xff) << 24;
            length1 += 6;

            length2 = (data[length1 + 2] & 0xff);
            length2 |= (data[length1 + 3] & 0xff) << 8;
            length2 |= (data[length1 + 4] & 0xff) << 16;
            length2 |= (data[length1 + 5] & 0xff) << 24;
            length1 += 6;
        } else {
            // get the values from the properties file
            length1 = Integer.parseInt(props.getProperty(baseFont + ".length1"));

            if (props.containsKey(baseFont + ".length2")) {
                length2 = Integer.parseInt(props.getProperty(baseFont + ".lenth2"));
            } else {
                length2 = length - length1;
            }
        }

        parseFont(data, length1, length2);
    }