public static DataDisplayTable listChars(Font font){
  String[] header={"Code point","Glyph ID","Unicode-designated name for code point"};
  Align[] displayAlignment={Align.Right,Align.Right,Align.Left};
  DataDisplayTable table=new DataDisplayTable(Arrays.asList(header));
  table.setAlignment(Arrays.asList(displayAlignment));
  CMap cmap=FontUtils.getUCSCMap(font);
  for (  int charId : cmap) {
    int glyphId=cmap.glyphId(charId);
    if (glyphId != CMapTable.NOTDEF) {
      String[] data={FontUtils.getFormattedCodePointString(charId),String.format("%d",glyphId),UCharacter.getExtendedName(charId)};
      table.add(Arrays.asList(data));
    }
  }
  return table;
}

public static DataDisplayTable listChars ( Font font ) { String [ ] header = { "Code point" , "Glyph ID" , "Unicode-designated name for code point" } ; Align [ ] displayAlignment = { Align . Right , Align . Right , Align . Left } ; DataDisplayTable table = new DataDisplayTable ( Arrays . asList ( header ) ) ; table . setAlignment ( Arrays . asList ( displayAlignment ) ) ; CMap cmap = FontUtils . getUCSCMap ( font ) ; for ( int charId : cmap ) { int glyphId = cmap . glyphId ( charId ) ; if ( glyphId != CMapTable . NOTDEF ) { String [ ] data = { FontUtils . getFormattedCodePointString ( charId ) , String . format ( "%d" , glyphId ) , UCharacter . getExtendedName ( charId ) } ; table . add ( Arrays . asList ( data ) ) ; } } return table ; }
gets a list of code points of valid characters and their names in the given font .
