utility functions, fixed multiline font rendering measurements