[Remind-Fans] Trying to change the font size for specific entries when using rem2ps

Craig B Agricola craig at theagricolas.org
Thu Dec 30 17:56:23 EST 2021


At the risk of being overly pedantic (but I have an unnatural love for writing
Postscript), there's faster code for the prefix that you suggested.  Since you
are using gsave/grestore, we don't care about eventual scaling-creep from
scaling up and then scaling back down, so you can use

(gsave currentfont 1.5 scalefont setfont) (grestore)

That saves the dictionary lookup of both /EntryFont and /EntrySize.  It would
also play nice if there was some other prefix/postfix code that this was
combined with.

I fully acknowlege that nowadays the speedup is likely unimportant because the
processor that the Postscript is running on is way too fast for it to matter,
but "back in the day" Postscript was being run in printers with slow CPUs that
would have cared, especially if this was being done to multiple reminders on
the calendar...

 Cheers,
  -Craig

PS. Since I don't post on the list often, I'll say "Thanks!" to Dianne again
    for Remind!

On Thu, Dec 30, 2021 at 04:36:05PM -0500, Dianne Skoll via Remind-fans wrote:
> The two ()()s after the reminder are PostScript strings; they contain
> PostScript code executed before and after rendering the reminder.  So
> edit to:
> 
> % ==============================
> [
>   [(Friend's)(Birthday)
> (gsave /EntryFont findfont EntrySize 1.5 mul scalefont setfont)(grestore)]
> ]
> (30) 1
> DoCalBox
> % ==============================
> 
> That executes:
> 
>    gsave /EntryFont findfont EntrySize 1.5 mul scalefont setfont
> 
> prior to rendering the reminder, which does the following:
>    gsave                       - save graphics context
>    /EntryFont findfont         - find the font used to draw calendar entries
>    EntrySize 1.5 mul scalefont - scale it up to 1.5x normal size
>    setfont                     - and set the font
> 
> Then after the reminder is rendered, grestore restores the graphics context.


More information about the Remind-fans mailing list