question: public static DataDisplayTable listCharsNeededToCoverScript ( Font font ) { String [ ] header = { "Script" , "Code Point" , "Name" } ; Align [ ] displayAlignment = { Align . Left , Align . Right , Align . Left } ; DataDisplayTable table = new DataDisplayTable ( Arrays . asList ( header ) ) ; table . setAlignment ( Arrays . asList ( displayAlignment ) ) ; HashMap < Integer , UnicodeSet > coveredScripts = new HashMap < Integer , UnicodeSet > ( ) ; CMap cmap = FontUtils . getUCSCMap ( font ) ; for ( int charId : cmap ) { if ( cmap . glyphId ( charId ) != CMapTable . NOTDEF ) { int scriptCode = UScript . getScript ( charId ) ; if ( scriptCode == UScript . UNKNOWN ) { continue ; } UnicodeSet scriptSet = null ; if ( ! coveredScripts . containsKey ( scriptCode ) ) { try { scriptSet = new UnicodeSet ( "[[:" + UScript . getName ( scriptCode ) + ":]-[:gc=Unassigned:]-[:gc=Control:]]" ) ; } catch ( IllegalIcuArgumentException e ) { continue ; } coveredScripts . put ( scriptCode , scriptSet ) ; } else { scriptSet = coveredScripts . get ( scriptCode ) ; } scriptSet . remove ( UCharacter . toString ( charId ) ) ; } } Set < Integer > sortedScripts = new TreeSet < Integer > ( coveredScripts . keySet ( ) ) ; for ( Integer scriptCode : sortedScripts ) { UnicodeSet uSet = coveredScripts . get ( scriptCode ) ; for ( String charStr : uSet ) { int codePoint = UCharacter . codePointAt ( charStr , 0 ) ; table . add ( Arrays . asList ( new String [ ] { String . format ( "%s" , UScript . getName ( scriptCode ) ) , FontUtils . getFormattedCodePointString ( codePoint ) , UCharacter . getExtendedName ( codePoint ) } ) ) ; } } return table ; }
target:  Gets a list of characters needed to fully cover scripts partially covered by the font