> > This assumes you know both the desired font and the desired colour, which > might be defined at other places in the document and not under your control.
Yeah, I know. I was trying to gauge how Groff's escape sequences might benefit an \X'…' sequence, and the PostScript I gave was a contrived—albeit functional—example of interpolating the current font-size. (Also, PostScript and grops(1) expect to work in two very different coordinate systems, as the former's origin starts in the bottom-left corner of the page). On Thu, 18 Jan 2024 at 04:26, Tadziu Hoffmann <hoffm...@usm.uni-muenchen.de> wrote: > > > > \fB\s(12\m[red]\X'ps: big bold red text in my device command'\fP > > > \X'ps: exec 1.0 0 0 setrgbcolor /Times-Bold findfont \n[.s] scalefont > setfont (Text) show' > > This assumes you know both the desired font and the desired > color, which might be defined at other places in the document > and not under your control. Thus, unless you need multiple > colors/fonts/sizes within the device code, it is probably more > practical to set theses outside, as in Branden's original sketch. > > Here is a possibly useful example: > > .defcolor my-outline-color rgb 0.9 0 0.7 > .fp 4 BI LinLibertineOBI > .\" ------------------------------------------------ > .de outline > \Z'\N'32''\X'ps: exec \\n(.s 0.01 mul setlinewidth (\\$1) true charpath > stroke'\h'\w'\\$1'u' > .. > .\" ------------------------------------------------ > Here is some > .gcolor my-outline-color > .ft BI > .outline outlined\/ > .gcolor > .ft > text. > > (Note that this code is not optimal, in particular because > grops does not set the font unless it is outputting something, > necessitating the hack of printing an explicit space with > \N'32' in order to get grops to set the desired font.) > > >