Diacritic glyphs have a valid width and height, but a
zero advance. Previously we were discarding these but
they are valid glyphs. The code also checks for a width
and height of 0 below, which catches non-printable glyphs
such as spaces.

Fixes #1846.