groff
[Top][All Lists]
Advanced

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

Re: Computer Modern Font


From: Robert Goulding
Subject: Re: Computer Modern Font
Date: Wed, 7 Jun 2023 13:59:48 -0400

I get a whole lot of errors of this type:

troff:/usr/local/share/groff/site-font/devpdf/CMUSerifR:13: error: font
description file name 'CMUSerifR' does not match 'name' argument 'cmunrm'
troff:/home/rdgoulding/.tmac/cmu.tmac:2: error: cannot load font
'CMUSerifR' for mounting
troff:/usr/local/share/groff/site-font/devpdf/CMUSerifB:13: error: font
description file name 'CMUSerifB' does not match 'name' argument 'cmunbx'
troff:rubbish.ms:2: warning: cannot select font 'B'

On Wed, Jun 7, 2023 at 12:23 PM Alexis <surryhill@gmail.com> wrote:

> Hello Damian,
>
> I've been meaning to use Computer Modern with groff for quite some time.
> Your message motivated me to find a semi-automated way to do that.
> Thanks!
>
> Please find attached a Makefile that downloads a specified release
> (currently 0.7.0) of the Computer Modern Unicode font sources from
>
>   https://sourceforge.net/projects/cm-unicode/files/
>
> and generates the font files for use with groff along with some
> helpful font name aliases.
> I find the original font names are named in a way that makes them
> hard to use, e.g. what font is provided by cmunst?
> Whereas their internal font name is much more explicit, e.g.
> CMUTypewriterOblique.¹
>
> To use the Makefile, place it in a directory you feel comfortable to
> include in GROFF_FONT_PATH and run:
>
>   % make download
>   % make fonts  # Needs to be two separate commands for now
>
> The Makefile requires common command-line utilities like grep, sed, awk
> etc. to be available and an installation of groff providing afmtodit.
>
> > What is the best way to use them?
> One very good way I found to use the Computer Modern font in my groff
> documents without needing to worry much about the details of setting the
> font is using the attached cmu.tmac macro package which substitutes
> groff's commonly used font styles (R, B, I, C, CI, etc.) with
> an equivalent from Computer Modern Unicode.
>
> To use cmu.tmac, place it in a directory you feel comfortable to
> include IN GROFF_TMAC_PATH and include the cmu macro package, either
> via the commandline, i.e. `-mcmu` or from within your document via
> `.mso cmu.tmac`.
>
> As an example the following command produces the documentation
> for the ms macro package using Computer Modern Unicode:
>
>   % groff -Tpdf -t -ms -mcmu doc/ms.ms > doc/ms.pdf
>
>
> Hope this helps
> Alexis
>
>
> ¹ For those wondering: The Makefile deletes hyphens from the font names
> as groff did not properly show the fonts that contained a hyphen
> in their name.
>


-- 
Robert Goulding
Director, John J. Reilly Center for Science, Technology, and Values;
Director, Program in History and Philosophy of Science;
Assoc. Professor, Program of Liberal Studies,
Fellow, Medieval Institute,
University of Notre Dame.


reply via email to

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