float xPos = 0; // X position to draw
int count = 0;
for (int i=0; i < len; i++){
Glyph gl = wcf.getGlyph(str.charAt(i));
int advance = (int)(gl.getGlyphPointMetrics().getAdvance());
if (advance ==0){
continue;
}
char c = gl.getChar();
fontIndex = wcf.getCharFontIndex(c, 0);
if (fontIndex != charFontIndex) {
charFontIndex = fontIndex;
at.transform(positions, 0, positions, 0, count);
int status = NativeFont.gdiPlusDrawDriverChars(graphicsInfo,
chars,
count,
font,
positions,
NativeFont.DriverStringOptionsCmapLookup,
matrix);
if (status != 0 && debugOutput){
// awt.err.02=GDIPlus DrawDriverString error status = {0}
System.err.println(Messages.getString("awt.err.02", status)); //$NON-NLS-1$
}
count = 0;
font = gl.getPFont();
}
chars[count] = c;
positions[count*2] = xPos;
positions[count*2 + 1] = yPos;