private void doTextNormal(final PDFPage cmds,final String text){
  final PointF zero=new PointF();
  final Matrix scale=new Matrix();
  Utils.setMatValues(scale,fsize,0,0,fsize * th,0,tr);
  final Matrix at=new Matrix();
  final List<PDFGlyph> l=(List<PDFGlyph>)font.getGlyphs(text);
  for (  final PDFGlyph glyph : l) {
    at.set(cur);
    at.preConcat(scale);
    final PointF advance=glyph.addCommands(cmds,at,tm);
    float advanceX=(advance.x * fsize) + tc;
    if (glyph.getChar() == ' ') {
      advanceX+=tw;
    }
    advanceX*=th;
    cur.preTranslate(advanceX,advance.y);
  }
  final float[] src={zero.x,zero.y};
  final float[] dst=new float[src.length];
  cur.mapPoints(dst,src);
  prevEnd.set(dst[0],dst[1]);
}

private void doTextNormal ( final PDFPage cmds , final String text ) { final PointF zero = new PointF ( ) ; final Matrix scale = new Matrix ( ) ; Utils . setMatValues ( scale , fsize , 0 , 0 , fsize * th , 0 , tr ) ; final Matrix at = new Matrix ( ) ; final List < PDFGlyph > l = ( List < PDFGlyph > ) font . getGlyphs ( text ) ; for ( final PDFGlyph glyph : l ) { at . set ( cur ) ; at . preConcat ( scale ) ; final PointF advance = glyph . addCommands ( cmds , at , tm ) ; float advanceX = ( advance . x * fsize ) + tc ; if ( glyph . getChar ( ) == ' ' ) { advanceX += tw ; } advanceX *= th ; cur . preTranslate ( advanceX , advance . y ) ; } final float [ ] src = { zero . x , zero . y } ; final float [ ] dst = new float [ src . length ] ; cur . mapPoints ( dst , src ) ; prevEnd . set ( dst [ 0 ] , dst [ 1 ] ) ; }
add some text to the page .
