public int codePointConversion ( String fontName , int codePoint ) { NonStandardFontFamily nonStandardFontFamily = get ( fontName ) ; if ( nonStandardFontFamily == null ) return codePoint ; CodePointSet codePointSet = nonStandardFontFamily . getCodePointSet ( ) ; if ( codePointSet == null ) return codePoint ; CodePoint decimalCodePoint = codePointSet . getByDecimal ( codePoint ) ; if ( decimalCodePoint != null ) // Fetches the correct unicode point return decimalCodePoint . getUnicodeDecimal ( ) ; CodePoint nameCodePoint = codePointSet . getByName ( charNameByCodePoint . get ( codePoint ) ) ; if ( nameCodePoint != null ) return nameCodePoint . getUnicodeDecimal ( ) ; return codePoint ; }
Takes in argument a codepoint . If for the given police the codepoint doesn t correspond to what the font actually displays the conversion is made . Otherwise the old codepoint is return .