Assuming that at some point you are going to set the text of this extended node, for example through a constructor like this
public MyNode(String text) {
super(text);
}
you can just use this.getFont().getSize();
I'm not sure if this will work if the node isn't rendered in the scene, however.