public static Phrase getPhrase ( Properties attributes ) { Phrase phrase = new Phrase ( ) ; phrase . setFont ( FontFactory . getFont ( attributes ) ) ; String value ; value = attributes . getProperty ( ElementTags . LEADING ) ; if ( value != null ) { phrase . setLeading ( Float . parseFloat ( value + "f" ) ) ; } value = attributes . getProperty ( Markup . CSS_KEY_LINEHEIGHT ) ; if ( value != null ) { phrase . setLeading ( Markup . parseLength ( value , Markup . DEFAULT_FONT_SIZE ) ) ; } value = attributes . getProperty ( ElementTags . ITEXT ) ; if ( value != null ) { Chunk chunk = new Chunk ( value ) ; if ( ( value = attributes . getProperty ( ElementTags . GENERICTAG ) ) != null ) { chunk . setGenericTag ( value ) ; } phrase . add ( chunk ) ; } return phrase ; }
Creates a Phrase object based on a list of properties .