Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!eru!hagbard!sunic!kth.se!news From: juha@tds.kth.se (Juha Sarlin) Newsgroups: comp.windows.x Subject: fix to font cacheing in ralpage postscript viewer Message-ID: Date: 13 Sep 90 13:22:40 GMT References: <1990Aug21.002853.14831@sics.se> Sender: news@kth.se (News Administrator) Distribution: comp Organization: The Royal Inst. of Techn., Stockholm Lines: 69 In-reply-to: jw@sics.se's message of 21 Aug 90 00:28:53 GMT In article <1990Aug21.002853.14831@sics.se>, jw@sics.se (Johan Widen) writes: jw> It turned out that there was a problem with user defined fonts, at least jw> they did not work for me. I "fixed" the problem by turning off the caching jw> of the user defined fonts (in ShowUser() in font.c). The error seems to be in the postscript function loaddiskcache. When a font is missing both OriginalName and FontName a temporary function 'name' doesn't become defined, but it is used anyway. Here is my fix and also a patch to re-enable cacheing in font.c: *** /tmp/,RCSt1a01663 Thu Sep 13 14:48:53 1990 --- ralpage/disk-cache Thu Sep 13 14:46:51 1990 *************** *** 54,60 **** } ifelse } ifelse def - } if ! CacheDirectory name known ry 0 eq and bx 0 eq and { --- 54,59 ---- } ifelse } ifelse def ! CacheDirectory name known ry 0 eq and bx 0 eq and { *************** *** 72,75 **** --- 71,75 ---- } { pop pop pop } ifelse } { pop pop pop } ifelse + } if } if end *** /tmp/,RCSt1a03377 Thu Sep 13 14:50:47 1990 --- source/font.c Thu Sep 13 14:46:05 1990 *************** *** 540,545 **** if (!FindCache ()) { ! /* This does not seem to work. A (possibly small) bug somewhere. */ ! /* VOID Push (ExecStack, AWidthShowName); VOID Push (OpStack, MakeReal (shim.hx)); VOID Push (OpStack, MakeReal (shim.hy)); --- 540,544 ---- if (!FindCache ()) { ! VOID Push (ExecStack, AWidthShowName); VOID Push (OpStack, MakeReal (shim.hx)); VOID Push (OpStack, MakeReal (shim.hy)); *************** *** 551,555 **** VOID Push (ExecStack, OpShowStop); PStopped (LoadDiskCacheName); ! return TRUE; */ } --- 550,554 ---- VOID Push (ExecStack, OpShowStop); PStopped (LoadDiskCacheName); ! return TRUE; } -- Juha Sarlin juha@tds.kth.se