| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>g.mkfontcap</em> is a utility to generate a GRASS font configuration file |
| 4 |
("fontcap") containing details of the fonts available on the current system. |
| 5 |
If <a href="https://freetype.org/">Freetype</a> is not installed, |
| 6 |
the font list will be limited to the set of Hershey stroke fonts supplied |
| 7 |
with GRASS. With Freetype enabled however, the module will recursively scan |
| 8 |
all files within a predefined hierarchy to find Freetype-compatible scalable |
| 9 |
fonts. The list of directories scanned is currently: |
| 10 |
<div class="code"><pre> |
| 11 |
/usr/lib/X11/fonts |
| 12 |
/usr/share/X11/fonts |
| 13 |
/usr/share/fonts |
| 14 |
/usr/local/share/fonts |
| 15 |
${HOME}/Library/Fonts |
| 16 |
/Library/Fonts |
| 17 |
/System/Library/Fonts |
| 18 |
${WINDIR}/Fonts |
| 19 |
</pre></div> |
| 20 |
<p>These correspond to directories where fonts can be found on some common |
| 21 |
operating systems. Extra directories to search can easily by added using the |
| 22 |
<b>extradirs</b> parameter, which accepts a comma-separated list. An extra |
| 23 |
directory may optionally contain an environment variable <em>at the start</em> |
| 24 |
of the string, if enclosed in ${xxx} syntax (see examples above). |
| 25 |
|
| 26 |
<p>The module will normally write to the standard fontcap file location, |
| 27 |
<code>$GISBASE/etc/fontcap</code>. If the environment variable |
| 28 |
<code>GRASS_FONT_CAP</code> is set, the output will instead be written |
| 29 |
to the file specified by that variable. This is useful if you don't have |
| 30 |
permission to modify <code>$GISBASE/etc/fontcap</code>: in this case you can |
| 31 |
use e.g. |
| 32 |
|
| 33 |
<div class="code"><pre> |
| 34 |
# use local file version instead of system copy |
| 35 |
GRASS_FONT_CAP=$HOME/.gfontcap |
| 36 |
export GRASS_FONT_CAP |
| 37 |
|
| 38 |
g.mkfontcap |
| 39 |
</pre></div> |
| 40 |
<p>to create a personal copy and then to make GRASS use that file |
| 41 |
instead of the system copy. |
| 42 |
|
| 43 |
<p>The output list of fonts is sorted first by type (Stroke fonts first, |
| 44 |
followed by Freetype) and within each type by the short name of the font. |
| 45 |
|
| 46 |
<h2>SEE ALSO</h2> |
| 47 |
|
| 48 |
|
| 49 |
<em> |
| 50 |
<a href="d.font.html">d.font</a> |
| 51 |
</em> |
| 52 |
|
| 53 |
<h2>AUTHOR</h2> |
| 54 |
|
| 55 |
Paul Kelly |