[Remind-Fans] Trying to change the font size for specific entries when using rem2ps
Justin Alcorn
justin at jalcorn.net
Fri Dec 31 14:01:18 EST 2021
I absolutely love the fact that there are still people in this world that
know how to write and optimize PostScript.
It makes me pine for the days that I knew and used LaTeX every day.
And also, from me...Thank you Dianne!
--
Justin B. Alcorn
The views expressed are not necessarily my own, much less anyone else's
PGP Fingerprint CCEB F776 C3FD 1050 C8DB 532E B8B9 BED7 7764 406C
On Thu, Dec 30, 2021 at 5:59 PM Craig B Agricola via Remind-fans <
remind-fans at lists.skoll.ca> wrote:
> 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.
> _______________________________________________
> Remind-fans mailing list
> Remind-fans at lists.skoll.ca
> https://dianne.skoll.ca/mailman/listinfo/remind-fans
> Remind is at https://dianne.skoll.ca/projects/remind/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dianne.skoll.ca/pipermail/remind-fans/attachments/20211231/8c16c69c/attachment.htm>
More information about the Remind-fans
mailing list