コード例 #1
0
ファイル: SpecialSymbol.java プロジェクト: dquangsinh/fb2pdf
 /**
  * Gets a chunk with a symbol character.
  *
  * @param c a character that has to be changed into a symbol
  * @param font Font if there is no SYMBOL character corresponding with c
  * @return a SYMBOL version of a character
  */
 public static Chunk get(char c, Font font) {
   char greek = SpecialSymbol.getCorrespondingSymbol(c);
   if (greek == ' ') {
     return new Chunk(String.valueOf(c), font);
   }
   Font symbol = new Font(FontFamily.SYMBOL, font.getSize(), font.getStyle(), font.getColor());
   String s = String.valueOf(greek);
   return new Chunk(s, symbol);
 }