As this function is needed for atktext get_character_extents and get_offset_at_point implementations.