r = ((r * fPixel)>>bdfFont.getDepth()) & 0xFF; g = ((g * fPixel)>>bdfFont.getDepth()) & 0xFF; b = ((b * fPixel)>>bdfFont.getDepth()) & 0xFF;
r = ((r * fPixel)>>bdfFontDepth) & 0xFF; g = ((g * fPixel)>>bdfFontDepth) & 0xFF; b = ((b * fPixel)>>bdfFontDepth) & 0xFF;
    final public void render(Surface surface, Shape clip, AffineTransform tx,            String str, int x, int y, Color color) {           if (str == null || str.length() == 0) {            System.err.println("empty string!");            return;        }                BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetrics();        int charsCount = str.length();        if ((bdfFont != null) && (charsCount > 0)) {            int offset = 0;            char[] chars = str.toCharArray();            for(int i=0;i<charsCount;i++) {                int base = fm.getDescent();                BDFGlyph glyph = bdfFont.getGlyph(chars[i]);                if(glyph==null) {                    continue;                }                                int fHeight= glyph.getBbx().height;                int[] fData = glyph.getData();                int scan = fData.length/fHeight;                                for(int k=0;k<fHeight;k++) {                    for(int j=0;j<scan;j++) {                        int fPixel = fData[(k*scan)+j];                        if(fPixel!=0) {                            int r = color.getRed(); //(color & 0x00FF0000) >> 16;                            int g = color.getGreen(); //(color & 0x0000FF00) >> 8;                            int b = color.getBlue(); //(color & 0x000000FF);                                                        r = ((r * fPixel)>>bdfFont.getDepth()) & 0xFF;                            g = ((g * fPixel)>>bdfFont.getDepth()) & 0xFF;                            b = ((b * fPixel)>>bdfFont.getDepth()) & 0xFF;                                                        fPixel = (((r << 16)+ (g << 8) +  b )| 0xFF000000);                                int px = x+offset+j;                            int py = y+(bdfFont.getBoundingBox().height+base-fHeight)+k-glyph.getBbx().y;                             surface.setRGBPixel(px, py, fPixel);                        }                    }                }                                offset+=glyph.getDWidth().width-glyph.getBbx().x;            }        }    }    