Rename text_layout.size() => num_lines().
Another typo.
Don't crash on empty geometries.
Fixes #2038.