public void drawChar(Graphics g, char c, int x, int y, int cw, int ch) {
        double dw, dh;
        Object Ientry;
        int w, h, entry, i, fontwidth, fontheight;

        Ientry = font.get(new Integer(c));
        if (Ientry == null) {
            return;
        }
        entry = (Integer) Ientry;
        fontwidth = fontdata[entry][SF_WIDTH];
        fontheight = fontdata[entry][SF_HEIGHT];

        dw = cw * 1.0 / fontwidth;
        dh = ch * 1.0 / fontheight;

        switch (fontdata[entry][SF_TYPE]) {
            case SF_BITMAP:
                for (h = 0; h < fontheight; h++) {
                    for (w = 0; w < fontwidth; w++) {
                        //FIXME: 8 bit max currently...
                        if (0 != (fontdata[entry][h + SF_DATA] & (1 << (7 - w)))) {
                            g.fillRect(x + (int) (w * dw), y + (int) (h * dh), ((int) ((w + 1) * dw)) - (int) (w *
                                    dw), ((int) ((h + 1) * dh)) - (int) (h * dh));
                        }
                    }
                }
                break;
            case SF_FILLRECT:
                i = SF_DATA;
                while (i < fontdata[entry].length) {
                    int xw, xh;

                    w = (fontdata[entry][i] & 0xF000) >> 12;
                    h = (fontdata[entry][i] & 0x0F00) >> 8;
                    xw = (fontdata[entry][i] & 0x00F0) >> 4;
                    xh = (fontdata[entry][i] & 0x000F);
                    g.fillRect(x + (int) (w * dw), y + (int) (h * dh), ((int) ((w + xw) * dw)) - (int) (w * dw),
                            ((int) ((h + xh) * dh)) - (int) (h * dh));
                    i++;
                }
                break;
            default:
                break;
        }
    }