public String resolveFont(java.awt.Font font){
  String ret="-*";
  ret=ret.concat("-" + font.getName());
  if (font.isBold())   ret=ret.concat("-bold");
 else   ret=ret.concat("-normal");
  if (font.isItalic())   ret=ret.concat("-i");
 else   ret=ret.concat("-o");
  ret=ret.concat("-normal");
  ret=ret.concat("--" + font.getSize());
  ret=ret.concat("-*");
  ret=ret.concat("-*");
  ret=ret.concat("-*");
  ret=ret.concat("-*");
  ret=ret.concat("-*");
  ret=ret.concat("-*");
  return ret;
}

public String resolveFont ( java . awt . Font font ) { String ret = "-*" ; ret = ret . concat ( "-" + font . getName ( ) ) ; if ( font . isBold ( ) ) ret = ret . concat ( "-bold" ) ; else ret = ret . concat ( "-normal" ) ; if ( font . isItalic ( ) ) ret = ret . concat ( "-i" ) ; else ret = ret . concat ( "-o" ) ; ret = ret . concat ( "-normal" ) ; ret = ret . concat ( "--" + font . getSize ( ) ) ; ret = ret . concat ( "-*" ) ; ret = ret . concat ( "-*" ) ; ret = ret . concat ( "-*" ) ; ret = ret . concat ( "-*" ) ; ret = ret . concat ( "-*" ) ; ret = ret . concat ( "-*" ) ; return ret ; }
in the idl , fonts are represented by a string . traditionally , with matt , the font was a x representation of a font . that ' s what is being done here - we ' re taking the font structure , and then going to xfont type text structure . dashes need to be included , line feeds are not . they are here only for readability . the jtext object brings this back to a java font . like wise , doing the transformation this way makes all specialists compatible with all other clients .
