ENH Font clone & derive
Brought to you by:
djmamana,
martingoros
Hi again. While I was working I also made some enhancements in Font class - added method clone() and derive. This should help when building up styles. Fromally if you had code:
Style defaultStyle = new Style("default");
Style validStyle = Style.createBlankStyle("validStyle", "default");
validStyle.getFont().setBold(true);
It changed the font on default style as well, workaround was to create new Font manually.
Now that should get easier with possibility to clone FontS or deriveFont(bool bold, bool italics, bool underline):
validStyle.setFont(defaultStyle.deriveFont(true, false, false));
Font clone and derive