diff --git a/lib/gks/plugin/qtplugin_impl.cxx b/lib/gks/plugin/qtplugin_impl.cxx index 1a9abc98f..5e10ace12 100644 --- a/lib/gks/plugin/qtplugin_impl.cxx +++ b/lib/gks/plugin/qtplugin_impl.cxx @@ -1342,7 +1342,21 @@ static void memory_plugin_dl_render(int fctid, int dx, int dy, int dimx, int *ia (void **)(&p->memory_plugin_ws_state_list)); } return; - + case 3: + if (gkss->fontfile != 0) + { + gks_close_font(gkss->fontfile); + } + break; + case 14: + { + int tx_prec = gkss->asf[6] ? gkss->txprec : predef_prec[gkss->tindex - 1]; + if ((tx_prec == GKS_K_TEXT_PRECISION_STROKE || tx_prec == GKS_K_TEXT_PRECISION_CHAR) && gkss->fontfile == 0) + { + gkss->fontfile = gks_open_font(); + } + } + break; case 54: if (!p->prevent_resize_by_dl || !p->interp_was_called) { @@ -1350,7 +1364,6 @@ static void memory_plugin_dl_render(int fctid, int dx, int dy, int dimx, int *ia p->window[1] = r1[1]; p->window[2] = r2[0]; p->window[3] = r2[1]; - p->memory_plugin(fctid, dx, dy, dimx, ia, lr1, r1, lr2, r2, lc, chars, (&p->memory_plugin_ws_state_list)); } break; case 55: @@ -1360,17 +1373,13 @@ static void memory_plugin_dl_render(int fctid, int dx, int dy, int dimx, int *ia p->viewport[1] = r1[1]; p->viewport[2] = r2[0]; p->viewport[3] = r2[1]; - p->memory_plugin(fctid, dx, dy, dimx, ia, lr1, r1, lr2, r2, lc, chars, (&p->memory_plugin_ws_state_list)); - } - break; - - default: - if (p->memory_plugin_initialised) - { - p->memory_plugin(fctid, dx, dy, dimx, ia, lr1, r1, lr2, r2, lc, chars, (&p->memory_plugin_ws_state_list)); } break; } + if (p->memory_plugin_initialised) + { + p->memory_plugin(fctid, dx, dy, dimx, ia, lr1, r1, lr2, r2, lc, chars, (&p->memory_plugin_ws_state_list)); + } } static void gks_memory_plugin_write_page()