fix font size change when reopening the same credocument

This should also fix #400 and fix #300 and implement #257.