groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Novel use of .char


From: Peter Schaffter
Subject: Novel use of .char
Date: Sat, 14 Dec 2024 14:42:00 -0500

An undocumented use of the .char request is mapping a special
character to a diversion holding a graphic image so the image can be
used as a glyph.

===
.\" 1.23.0.2146-d958f-dirty
.\" Build with pdfmom(1); output to pdf
.
.sp 6P-1v
.
.nr img-w 25p
.nr img-d 22p
.
.di img-div
.ev img-div
.nf
\X'pdf: pdfpic GNU-head-small.png'
.ev
.di
.
.char \[img] \h'-\w'.'u'\m[white].\m[]\*[img-div]
.
.ds gnu \v'-\n[img-d]u'\[img]\h'\n[img-w]u'
.
.nop A GNU head \*[gnu] image.
===

I'm attaching GNU-head-small.png if anyone wants to test this out.
The mapped diversion requires a glyph--any glyph--beforehand or it
won't output in position (hence the whited-out period kludge).  Can
anyone explain why this is?

-- 
Peter Schaffter
https://www.schaffter.ca

Attachment: gnu-head.roff
Description: Text Data

Attachment: GNU-head-small.png
Description: PNG image

Attachment: gnu-head.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]