First we generate a character outline andapply the grid fitting. Then nobbox_draw computes the path bbox and checks rect_within(bbox, pbfont- >FontBBox). If not (it is so with cxs.present == metricsSideBearingAndWidth), it enhances FontBBox and restarts all again. Thus zchar_set_cache, the type 1 interpreter and the type 1 hinter are called 2 times, and type1_exec_init is called 4 times due to the sbw callout. Also zchar_get_metrics2 may be called with no reason when there is no CDevProc. Actually we could do all in a single pass if set up the cache device after we compute the grid-fitted outline. As a consequence possibly we could drop gs_text_retry.
Created attachment 1003 [details] gsbug-2.ps A test file with a single glyph to reproduce the problem. It is made form the test file of the bug 687614. The original test file of the bug 687614 is useful for debugging Metrics with the optimized algorithm.
Fixed in Ghostscript 9.03
Effectively, this is fixed with the FAPI/Freetype integration.