private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
  ois.defaultReadObject();
  boolean hasFont=ois.readBoolean();
  if (hasFont) {
    String name=(String)ois.readObject();
    int size=ois.readInt();
    int style=ois.readInt();
    font=new Font(name,style,size);
  }
 else {
    font=OMText.DEFAULT_FONT;
  }
}

private void readObject ( ObjectInputStream ois ) throws ClassNotFoundException , IOException { ois . defaultReadObject ( ) ; boolean hasFont = ois . readBoolean ( ) ; if ( hasFont ) { String name = ( String ) ois . readObject ( ) ; int size = ois . readInt ( ) ; int style = ois . readInt ( ) ; font = new Font ( name , style , size ) ; } else { font = OMText . DEFAULT_FONT ; } }
reconstitute from an objectinputstream .
