Solved Setting roff fonts

Hi, I write documentation for my company in roff ms, compiled in pdf format.

Are there some roff users knowing how to change the default font ? I am relatively new to using roff.
 
This Tutorial explains how to add a font to your groff distribution.

Groff (or gnu troff) comes with 5 or six fonts by default.
Utroff and neatroff on the other side can load your system fonts (open type and TrueType) and have Knuth-Plas algorithm implemented indeed.
 
The documents relating to Joe Ossanna and Brian Kernighan's original work with troff and nroff are worth reading.

James Clark made a very significant contribution with groff(1), which is well documented.

The documents for the groff ms macros are relevant, because they have been re-implemented from the ground up.

Selecting a font and a font family are covered in the The GNU Troff Manual.

But the short answer to your question is that the default font is located in font positions 1 through 4, traditionally populated with the upright, slanted, bold, and bold slanted type faces.

The names of your fonts (and, by inference, font families) available to you are enumerated as file names in /usr/local/share/groff/current/font/devpdf.

And you can change the default font family by using groff's .fam directive, e.g. for Helvetica:
Code:
.fam H
or you can do it directly by appending the type face style to the basic font name to re-populate each of the four font positions:
Code:
.fp 1 HR
.fp 2 HI
.fp 3 HB
.fp 4 HBI
 
I do not really have a straight template for now, but I add this to all my files, if that's what you're talking about.

I mainly played with .ms so far, maybe I'll look into and .mom soon or later.

Code:
.defcolor blue    rgb 0.1f 0.1f 1.0f
.defcolor bsdred  rgb #9d0006
.defcolor codered rgb #990000
.defcolor coderedbg rgb #eee4e4
.defcolor codeblack rgb #440000
.defcolor fileblue rgb #0000ee
.defcolor grey    rgb #aaaaaa
.defcolor black   rgb #000000
.color
.de bsdred
.gcolor bsdred
..
.de endc
.gcolor black
..
.de nh1
.gcolor bsdred
.NH 1
\\$1
.gcolor black
..
.de nh2
.gcolor bsdred
.NH 2
\\$1
.gcolor black
..
.de nh3
.gcolor bsdred
.NH 3
\\$1
.gcolor black
..
.de xa
.XA \\$1
.B "\m[bsdred]\\$2\m[]" \\$3 \\$4
..
.de b
.B "\m[bsdred]\\$1\m[black]" \\$2 \\$3
..
.de code
.CW "\m[codered]\\$1\m[black]" \\$2 \\$3
.gcolor black
..
.de pre
.CW "\m[codeblack]\\$1\m[black]" \\$2 \\$3
.gcolor black
..
.de file
.CW "\m[fileblue]\\$1\m[black]" \\$2 \\$3
.gcolor black
..
.de bu
.IP \(bu 2
..
.
.
.
.
.nr PS 12.5p
.nr PO 0.5i
.nr LL 7.5i
.nr HM 0.5i
.nr PSINCR 2.5p
.nr GROWPS 3
.nr PI 4n
.nr QI 4n
.ds CH
.ds CF - \En[PN]-
.fam H
.RP no
.P1
 
Back
Top