bug in text rendering and extents when hinting disabled
When the font is set to "Verdana" (installed by the ttf-mscorefonts-installer package) and hinting is disabled (see attached bug.c), some strings are drawn incorrectly the first time they are drawn. Specifically, some letters are drawn over others, and the width of the rendered text is incorrect. But the rendering and extents are correct the second time the text is drawn. I haven't encountered this bug with another font, but I haven't looked very hard.
My OS is Ubuntu 18.04.2, on x86_64. The versions of pango, pangocairo, and cairo as reported by the package manager are: libpango-1.0-0 is version 1.40.14-1ubuntu0.1; libpangocairo-1.0-0 is version 1.40-14-1ubuntu0.1; libcairo2 is version 1.15.10-2ubuntu0.1. The command
pkg-config --modversion pango pangocairo cairo reports
1.40.14 1.40.14 1.15.10.
I have attached a short program that reliably demonstrates the bug on my system. It produces two PNG images (also attached);
output1.png has the bad rendering, and
output2.png (produced by exactly the same code) has correct rendering.