public Font pdfToAwt ( BaseFont font , int size ) { String names [ ] [ ] = font . getFullFontName ( ) ; if ( names . length == 1 ) return new Font ( names [ 0 ] [ 3 ] , 0 , size ) ; String name10 = null ; String name3x = null ; for ( int k = 0 ; k < names . length ; ++ k ) { String name [ ] = names [ k ] ; if ( name [ 0 ] . equals ( "1" ) && name [ 1 ] . equals ( "0" ) ) name10 = name [ 3 ] ; else if ( name [ 2 ] . equals ( "1033" ) ) { name3x = name [ 3 ] ; break ; } } String finalName = name3x ; if ( finalName == null ) finalName = name10 ; if ( finalName == null ) finalName = names [ 0 ] [ 3 ] ; return new Font ( finalName , 0 , size ) ; }
Returns an AWT Font which can be used to represent the given BaseFont