groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: [mom]: Doc fixes appendices.html: amend font installation


From: Peter Schaffter
Subject: [groff] 01/01: [mom]: Doc fixes appendices.html: amend font installation instructions stylesheet.css: disable ligatures tables-of-contents: trivial clarification typesetting.html: amend and correct wording of ALD/RLD/SPACE.
Date: Wed, 17 Aug 2022 19:13:41 -0400 (EDT)

PTPi pushed a commit to branch master
in repository groff.

commit 53a0f2c05a3a477f8be555fee2e12ab74f8cc68e
Author: Peter Schaffter <peter@schaffter.ca>
AuthorDate: Wed Aug 17 18:46:16 2022 -0400

    [mom]: Doc fixes
    appendices.html: amend font installation instructions
    stylesheet.css: disable ligatures
    tables-of-contents: trivial clarification
    typesetting.html: amend and correct wording of ALD/RLD/SPACE.
---
 contrib/mom/momdoc/appendices.html         | 101 ++++++++++++++++++++++-------
 contrib/mom/momdoc/stylesheet.css          |   4 +-
 contrib/mom/momdoc/tables-of-contents.html |   4 +-
 contrib/mom/momdoc/typesetting.html        |  78 +++++++++++++++-------
 4 files changed, 137 insertions(+), 50 deletions(-)

diff --git a/contrib/mom/momdoc/appendices.html 
b/contrib/mom/momdoc/appendices.html
index d063e5d99..ae768f473 100644
--- a/contrib/mom/momdoc/appendices.html
+++ b/contrib/mom/momdoc/appendices.html
@@ -24,7 +24,7 @@ FDL in the main directory of the groff source package.
   <link rel="stylesheet" type="text/css" href="stylesheet.css" />
 </head>
 
-<body style="background-color: #f5faff;">
+<body style="background-color: #f5faff; font-variant-ligatures: none; 
font-feature-settings: "liga" 0;">
 
 <!-- ==================================================================== -->
 
@@ -82,7 +82,9 @@ can be found, if necessary, by typing
 <span class="pre-in-pp">
   groff -v
 </span>
-at the command line.
+at the command line.  Groff installations usually make a symlink to
+the current version so &#8216;current&#8217; may be used instead of
+the literal version number.
 </p>
 </div>
 
@@ -415,7 +417,7 @@ your type would come out in Courier Roman!
   <li><a href="#step-1">1. Acquire the font</a></li>
   <li><a href="#step-2">2. Prepare to convert the font to the correct 
format</a>
   <ul style="margin-left: -.5em">
-    <li><a href="#ttf">TTF fonts</a></li>
+    <li><a href="#ttf">TTF/OTF fonts</a></li>
     <li><a href="#type1">Type 1 fonts</a></li>
   </ul></li>
   <li><a href="#step-3">3. Convert the font and put it in the right 
place</a></li>
@@ -434,7 +436,11 @@ your type would come out in Courier Roman!
 <p>
 There are a number of ways to approach making fonts available
 to groff.  These instructions aren&#8217;t meant to cover all
-possibilities, merely one.
+possibilities, merely one.  What's more, they're meant for users
+wanting to understand what's involved.  The much simpler way
+is the
+<a href="#install-font">install-font.sh</a>
+script, which automates the whole process.
 </p>
 
 <p>
@@ -475,9 +481,10 @@ to the way their distro operates.
       /etc/groff/
     </span>
     If you can&#8217;t find the site-font directory, locate
-    groff&#8217;s <kbd>site-tmac</kbd> directory, and, as root,
-    create site-font in the same directory.  Eg, if you find
-    site-tmac in <kbd>/usr/share/groff/</kbd>, create site-font in
+    groff&#8217;s <kbd class="nobr">site-tmac</kbd> directory, and,
+    as root, create site-font in the same directory.  E.g., if you
+    find site-tmac in <kbd class="nobr">/usr/share/groff/</kbd>,
+    create <span class="nobr">site-font</span> in
     <kbd>/usr/share/groff/</kbd>
     <br/>
     <span class="pre-in-pp" style="margin-bottom: -2em;">
@@ -516,10 +523,10 @@ Generate($fontname + ".pfa");
 <h3 id="step-1" class="docs appendices">Step 1: Acquire the font</h3>
 
 <p class="top">
-The two most commonly available types of fonts are PostScript Type1
-(extension .pfb) and TrueType (extension .ttf).  Either can be made
-available to groff.  There are many websites holding collections of
-both.
+The most commonly available types of fonts are PostScript Type1
+(extension .pfb), TrueType (extension .ttf), and OpenType.  All
+can be made available to groff.  There are many websites holding
+collections of all three.
 </p>
 
 <h3 id="step-2" class="docs appendices">Step 2: Prepare to convert the font to 
the correct format</h3>
@@ -537,8 +544,8 @@ the file 'text.map':
 </span>
 See
 <a href="#small-note">here</a>
-for an explanation of &lt;prefix&gt;
-and &lt;version&gt;.
+for an explanation of <kbd>&lt;prefix&gt;</kbd>
+and <kbd>&lt;version&gt;</kbd>.
 </p>
 
 <p>
@@ -555,14 +562,14 @@ directory, make links to the files 'generate-t42.pe' and
 <h3 id="step-3" class="docs appendices">Step 3: Convert the font and put it in 
the right place</h3>
 
 <p class="top">
-TrueType fonts (.ttf) need to be converted to .t42.  Type 1 fonts
-(.pfb) need to be converted to .pfa.
+TrueType (.ttf) and OpenType (.otf) fonts need to be converted to
+.t42.  Type 1 fonts (.pfb) need to be converted to .pfa.
 </p>
 
-<h4 id="ttf" class="docs" style="font-size: 90%; text-transform: 
uppercase;">&nbsp;&bull;&nbsp;TTF Fonts</h4>
+<h4 id="ttf" class="docs" style="font-size: 90%; text-transform: 
uppercase;">&nbsp;&bull;&nbsp;TTF/OTF Fonts</h4>
 
 <p class="top" style="margin-top: .5em;">
-For .ttf fonts, run
+For .ttf and .otf fonts, run
 <br/>
 <span class="pre-in-pp">
   fontforge -script generate-t42.pe &lt;file&gt;.ttf
@@ -648,7 +655,21 @@ Make a note of the internal name.
 <h4 id="add" class="docs" style="font-size: 90%; text-transform: 
uppercase;">&nbsp;&bull;&nbsp;Add the font to the download file</h4>
 
 <p class="top" style="margin-top: .5em;">
-Open the file <kbd>&lt;prefix&gt;/&lt;version&gt;/font/devps/download</kbd>.
+If you are installing fonts in site-font for the first time, copy
+the file
+<br/>
+<span class="pre-in-pp">
+  &lt;prefix&gt;/&lt;version&gt;/font/devps/download
+</span>
+to
+<br/>
+<span class="pre-in-pp">
+  &lt;prefix&gt;/site-font/devps/
+</span>
+</p>
+
+<p>
+Open <kbd class="nobr">&lt;prefix&gt;/site-font/devps/download</kbd>.
 In it you will see lines of the form
 <br/>
 <span class="pre-in-pp">
@@ -669,7 +690,7 @@ is really
 </span>
 </p>
 
-<p>
+<p id="add-devps-fonts">
 The download file maps the internal names used by groff to the
 actual fonts.  To add your new font to the download file, append a
 line containing the internal name, followed by a tab (make sure your
@@ -690,12 +711,42 @@ contain
 <h4 id="gropdf-download" class="docs" style="font-size: 90%; text-transform: 
uppercase;">&nbsp;&bull;&nbsp;Updating the gropdf download file</h4>
 
 <p class="top" style="margin-top: .5em;">
-If you&#8217;re running a recent version of groff that includes the
-native pdf device (gropdf), you must update its download file as
-well, which is found in <kbd>&lt;prefix&gt;/&lt;version&gt;/font/devpdf/</kbd>.
-The instructions are identical to those above, but with one important
-difference: all lines must begin with a tab character.  Thus, using
-our Optima example, your devpdf download line for the same font is
+If you&#8217;re running a recent version of groff that
+includes the native pdf device (gropdf), you must copy its
+<br/>
+<span class="pre-in-pp">
+  &lt;prefix&gt;/&lt;version&gt;/font/devpdf/download
+</span>
+to
+<span class="pre-in-pp">
+  &lt;prefix&gt;/site-font/devpdf/
+</span>
+In addition, copy over the files <kbd>freeeuro.pfa</kbd> and
+<kbd>EURO</kbd>, located in
+<kbd class="nobr">&lt;prefix&gt;/&lt;version&gt;/font/devps/</kbd>,
+to
+<kbd class="nobr">&lt;prefix&gt;/site-font/devpdf/</kbd>.
+</p>
+
+<p>
+Open
+<kbd class="nobr">&lt;prefix&gt;/site-font/devpdf/download</kbd>
+and add the line
+<br/>
+<span class="pre-in-pp">
+  &lt;tab&gt;FreeEuro&lt;tab&gt;freeeuro.pfa
+</span>
+where <kbd>&lt;tab&gt;</kbd> means the tab key; make sure your text
+editor is putting in the tab character, not spaces.
+</p>
+
+<p>
+Subsequently adding new fonts to <kbd>site-font/devpdf/download</kbd>
+is the same as
+<a href="#add-devps-fonts">adding fonts to site-font/devps/download</a>
+but with one important difference: every line must begin with a tab.
+Thus, using our Optima example, your line for it in
+<kbd>site-font/devpdf/download</kbd> should read
 <br/>
 <span class="pre-in-pp">
   &lt;tab&gt;Optima-Bold&lt;tab&gt;Optima-Bold.pfa
diff --git a/contrib/mom/momdoc/stylesheet.css 
b/contrib/mom/momdoc/stylesheet.css
index 6c8c2b3d1..9d9efa329 100644
--- a/contrib/mom/momdoc/stylesheet.css
+++ b/contrib/mom/momdoc/stylesheet.css
@@ -37,11 +37,13 @@ a:link.quick { text-decoration: underline; }
   color: #302419 ;
   background-color: #ffffeb ;
   font: 1em/1.5em arial,sans-serif ;
+  font-variant-ligatures: none;
 }
 
 .nobr /* Make <nobr> a class property */
 {
-  white-space: nowrap;  hyphens: none;
+  white-space: nowrap ;
+  hyphens: none ;
 }
 
 /* Heads */
diff --git a/contrib/mom/momdoc/tables-of-contents.html 
b/contrib/mom/momdoc/tables-of-contents.html
index 99d93806f..1f9affbdc 100644
--- a/contrib/mom/momdoc/tables-of-contents.html
+++ b/contrib/mom/momdoc/tables-of-contents.html
@@ -834,8 +834,8 @@ Mom sensibly indents and aligns all levels of entry.  If 
you change
 the indent for any level, all levels beneath it are still indented
 according to mom&#8217;s normal arrangement, but with the indent
 assigned to <kbd>level</kbd> taken into account.  When you use
-<kbd>INDENT</kbd>, the indent is measured from the left margin of
-the entire text of the previous level, including numbering, if any.
+<kbd>INDENT</kbd>, the indent is measured from the left edge of
+the text of the previous level, including numbering, if any.
 </p>
 
 <p>
diff --git a/contrib/mom/momdoc/typesetting.html 
b/contrib/mom/momdoc/typesetting.html
index 171c3649f..594254376 100644
--- a/contrib/mom/momdoc/typesetting.html
+++ b/contrib/mom/momdoc/typesetting.html
@@ -1754,7 +1754,7 @@ which is covered in the section
 </div>
 
 <div class="box-macro-args">
-Macro: <b>SPACE</b> <kbd class="macro-args">&lt;space to add between 
lines&gt;</kbd>
+Macro: <b>SPACE</b> <kbd class="macro-args">[&lt;space to add between 
lines&gt;]</kbd>
 </div>
 <p class="alias">
 <i>Alias:</i> <b>SP</b>
@@ -1764,9 +1764,7 @@ Macro: <b>SPACE</b> <kbd class="macro-args">&lt;space to 
add between lines&gt;</
 SPACE breaks a line, just like
 <a href="#br">BR</a>,
 then adds space after the line.  With no argument, it adds an extra
-line space of a value equal to the current
-<a href="definitions.html#leading">leading</a>.
-If you pass it a numeric argument without supplying a
+line space.  If you pass it a numeric argument without supplying a
 <a href="definitions.html#unitofmeasure">unit of measure</a>,
 it advances that number of extra line spaces.  For example:
 <br/>
@@ -1782,16 +1780,13 @@ breaks the line and adds two extra linespaces.
 </p>
 
 <p>
-If you supply a unit of measure, SPACE breaks the line then advances
-one linespace (at the current
-<a href="definitions.html#leading">leading</a>)
-<i>plus</i> the specified amount of extra space given to SPACE, as in
+If you supply a unit of measure, SPACE breaks the line and advances
+the specified vertical distance, as in
 <br/>
 <span class="pre-in-pp">
   .SPACE 6p
 </span>
-which breaks the line and advances one full linespace plus six
-points.
+which breaks the line and advances six points further.
 </p>
 
 <div class="box-tip">
@@ -3141,12 +3136,30 @@ relative to the current vertical position.
 </p>
 
 <p>
-Used by itself, or preceded by
-<a href="#br">BR</a>,
-ALD will advance by one line space plus the distance you specify.
-Preceded by
-<a href="#el">EL</a>,
-it will advance by exactly the distance you specify.
+ALD causes a line break, which means the argument is added to the
+current
+<a href="definitions.html#leading">leading</a>.
+For example, if your current leading is 12 points, a line of type
+after <kbd>.ALD 6p</kbd> will be 18 points distant from the previous
+line.
+</p>
+
+<p>
+If you wish to advance the argument's distance <i>from the
+current baseline,</i> it should be preceded by
+<a href="#el">EL</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+  .LEFT
+  .LS 12
+  First line.
+  Second line.\c
+  .EL
+  .ALD 15p
+  Third line.
+</span>
+would place the third line exactly 15 points beneath the second.
 </p>
 
 <p>
@@ -3204,12 +3217,33 @@ relative to the current vertical position.
 </p>
 
 <p>
-Used by itself, or preceded by
-<a href="#br">BR</a>,
-RLD will advance by one line space, then reverse by the distance you
-specify.  Preceded by
-<a href="#el">EL</a>,
-it will reverse by exactly the distance you specify.
+RLD causes a line break, which means the argument is subtracted from
+the current
+<a href="definitions.html#leading">leading</a>.
+For example, if your current leading is 12 points, a line of type
+after <kbd>.RLD 6p</kbd> will be 6 points distant from the previous
+line.
+</p>
+
+<p>
+If you wish to move upward <i>from the current baseline</i> by the
+argument's distance, RLD should be preceded by
+<a href="#el">EL</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+  .LEFT
+  .LS 18
+  First line.
+  Second line.\c
+  .EL
+  .RLD 3p
+  Third line.
+</span>
+would raise the third line by 3 points relative to the baseline of
+the second line.  Put another way, if the <kbd>.RLD</kbd> in the
+example were 18p, the third line would fall on the same baseline as
+the second.
 </p>
 
 <p>



reply via email to

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