From 36e7d38af2a11b5e4d7117ddd0ebf7326fad7c72 Mon Sep 17 00:00:00 2001 From: Chris Liddell Date: Tue, 30 Jan 2018 09:31:04 +0000 Subject: Bug 698767: Improve handling of multiple master fonts The FAPI API didn't really handle the possibility that multiple master fonts could change (via setweightvector) without a call to definefont/setfont etc. We now allow two ways for FAPI to handle this: if the scaler in force allows it, we'll set the new weight vector, and carry on as before. If the scaler does *not* allow us to change the weight vector "on the fly", we'll destroy the scaler's font object and related data, and recreate it with the new weight vector in the font dictionary. --- base/gsalloc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'base/gsalloc.c') diff --git a/base/gsalloc.c b/base/gsalloc.c index b56cb4a69..f873a28ac 100644 --- a/base/gsalloc.c +++ b/base/gsalloc.c @@ -2522,10 +2522,8 @@ alloc_close_clump(gs_ref_memory_t * mem) { #ifdef DEBUG if (gs_debug_c('A')) { - if (mem->cc != NULL) { - dmlprintf1((const gs_memory_t *)mem, "[a%d]", alloc_trace_space(mem)); - dmprintf_clump((const gs_memory_t *)mem, "closing clump", mem->cc); - } + dmlprintf1((const gs_memory_t *)mem, "[a%d]", alloc_trace_space(mem)); + dmprintf_clump((const gs_memory_t *)mem, "closing clump", mem->cc); } #endif } @@ -2536,10 +2534,8 @@ alloc_open_clump(gs_ref_memory_t * mem) { #ifdef DEBUG if (gs_debug_c('A')) { - if (mem->cc != NULL) { - dmlprintf1((const gs_memory_t *)mem, "[a%d]", alloc_trace_space(mem)); - dmprintf_clump((const gs_memory_t *)mem, "opening clump", mem->cc); - } + dmlprintf1((const gs_memory_t *)mem, "[a%d]", alloc_trace_space(mem)); + dmprintf_clump((const gs_memory_t *)mem, "opening clump", mem->cc); } #endif } -- cgit v1.2.1