y-=fm.getDescent();
    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;            final char[] chars = str.toCharArray();            final int bdfFontDepth = bdfFont.getDepth();            for(int i=0;i<charsCount;i++) {                int base = fm.getDescent();                BDFGlyph glyph = bdfFont.getGlyph(chars[i]);                if(glyph==null) {                    continue;                }                                final int fHeight= glyph.getBbx().height;                final int glyphBbxY = glyph.getBbx().y;                final int bdfFontBbxHeight = bdfFont.getBoundingBox().height;                final int[] fData = glyph.getData();                final int scan = fData.length/fHeight;                final Point2D src = new Point2D.Double();                final Point2D dst = new Point2D.Double();                //                if(i == 0)//                {//                    System.out.println("BDF:x="+x+" y="+y+" fHeight="+fHeight+//                    		" fData.length="+fData.length+" scan="+scan+//                    		" bdfFontBbxHeight="+bdfFontBbxHeight+//                    		" glyphBbxY="+glyphBbxY+" base="+base);//                    Rectangle r = clip.getBounds();//                    System.out.println("bounds:x="+r.x+" y="+r.y+//                    			" width="+r.width+" height="+r.height);//                    src.setLocation(x, y);//                    tx.transform(src, dst);                    //                    System.out.println("newX="+dst.getX()+" newY="+dst.getY());//                    //                    double[] d = new double[9];//                    tx.getMatrix(d);//                    for(int j = 0 ; j  < d.length ; j++) System.out.print(d[j] + " ");//                    System.out.println();//                }                                for(int k=0;k<fHeight;k++) {                	final int offsetLine = k*scan;                    for(int j=0;j<scan;j++) {                        int fPixel = fData[offsetLine+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)>>bdfFontDepth) & 0xFF;                            g = ((g * fPixel)>>bdfFontDepth) & 0xFF;                            b = ((b * fPixel)>>bdfFontDepth) & 0xFF;                                                        fPixel = (((r << 16)+ (g << 8) +  b )| 0xFF000000);                                int px = x+offset+j;                            //int py = y+(bdfFontBbxHeight+base-fHeight)+k-glyphBbxY;                            int py = y+(base-fHeight)+k-glyphBbxY;                                                        src.setLocation(px, py);                            tx.transform(src, dst);                            //if(clip.contains(dst))                            //{	                            px = (int) dst.getX();	                            py = (int) dst.getY();	                            		                            surface.setRGBPixel(px, py, fPixel);                            //}                        }                    }                }                                offset+=glyph.getDWidth().width-glyph.getBbx().x;            }        }    }    