src/java/org/apache/fop/afp/svg/AFPTextHandler.java
private int registerPageFont(AFPPageFonts pageFonts, String internalFontName, int fontSize) {
        AFPFont afpFont = (AFPFont)fontInfo.getFonts().get(internalFontName);
        // register if necessary
        AFPFontAttributes afpFontAttributes = pageFonts.registerFont(
                internalFontName,
                afpFont,
                fontSize
        );
        if (afpFont.isEmbeddable()) {
            try {
                final CharacterSet charSet = afpFont.getCharacterSet(fontSize);
                this.resourceManager.embedFont(afpFont, charSet);
            } catch (IOException ioe) {
                throw new RuntimeException("Error while embedding font resources", ioe);
            }
        }
        return afpFontAttributes.getFontReference();
    }
/**
     * Registers a page font
     *
     * @param internalFontName the internal font name
     * @param fontSize the font size
     * @return a font reference
     */
Registers a page font
@param internalFontName the internal font name
@param fontSize the font size
@return a font reference
Registers a page font @param internalFontName the internal font name @param fontSize the font size @return a font reference
private int registerPageFont(AFPPageFonts pageFonts, String internalFontName, int fontSize) {
        AFPFont afpFont = (AFPFont)fontInfo.getFonts().get(internalFontName);
        AFPFontAttributes afpFontAttributes = pageFonts.registerFont(
                internalFontName,
                afpFont,
                fontSize
        );
        if (afpFont.isEmbeddable()) {
            try {
                final CharacterSet charSet = afpFont.getCharacterSet(fontSize);
                this.resourceManager.embedFont(afpFont, charSet);
            } catch (IOException ioe) {
                throw new RuntimeException("Error while embedding font resources", ioe);
            }
        }
        return afpFontAttributes.getFontReference();
    }
private int registerPageFont ( AFPPageFonts pageFonts , String internalFontName , int fontSize ) { AFPFont afpFont = ( AFPFont ) fontInfo . getFonts ( ) . get ( internalFontName ) ; AFPFontAttributes afpFontAttributes = pageFonts . registerFont ( internalFontName , afpFont , fontSize ) ; if ( afpFont . isEmbeddable ( ) ) { try { final CharacterSet charSet = afpFont . getCharacterSet ( fontSize ) ; this . resourceManager . embedFont ( afpFont , charSet ) ; } catch ( IOException ioe ) { throw new RuntimeException ( "Error while embedding font resources" , ioe ) ; } } return afpFontAttributes . getFontReference ( ) ; }
Registers a page font
 @param internalFontName the internal font name
 @param fontSize the font size
 @return a font reference
Registers a page font @param internalFontName the internal font name @param fontSize the font size @return a font reference
// register if necessary