public boolean importFont ( String fontNr , String fontName , String fontFamily , int charset ) { RtfFont rtfFont = new RtfFont ( fontName ) ; if ( charset >= 0 ) rtfFont . setCharset ( charset ) ; if ( fontFamily != null && fontFamily . length ( ) > 0 ) rtfFont . setFamily ( fontFamily ) ; rtfFont . setRtfDocument ( this . rtfDoc ) ; this . importFontMapping . put ( fontNr , Integer . toString ( this . rtfDoc . getDocumentHeader ( ) . getFontNumber ( rtfFont ) ) ) ; return true ; }
Imports a font . The font name is looked up in the RtfDocumentHeader and then the mapping from original font number to actual font number is added .