}
public byte getCharSet() {
CTIntProperty charset= ctFont.sizeOfCharsetArray() == 0?null:ctFont.getCharsetArray(0);
if(charset!=null){
//this value must be set -- can't be null
switch (charset.getVal()) {
case Charset.ANSI_CHARSET:
return Font.ANSI_CHARSET;
case Charset.DEFAULT_CHARSET:
return Font.DEFAULT_CHARSET;
case Charset.SYMBOL_CHARSET:
return Font.SYMBOL_CHARSET;
default://maight be correct to return this byte value???
return Byte.parseByte(Integer.toString(charset.getVal()));
}
}
else
return Font.ANSI_CHARSET;
}