[[ Bugfix 12385 ]] Prevent crash when measuring text and the font is not initialized