two questions....

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Jun 3 06:36:34 UTC 2010


On Wed, 2 Jun 2010 16:04:20 -0700, Gary Kline <kline at thought.org> wrote:
> guys, i just found a truckload of Just Outstanding fonts.  at the CTAN
> .org site there must be hundreds of these superb serif typefaces.  in
> my /home/kline/ directory, i have a ~/.fonts directory.  but it's been
> awhile since i've added to it.  what's the magic to getting these
> tex-gyre fonts can use them?  i would like these to be available for
> abiword, OOo, as well as my tex packages. clues, please.

Installing fonts in ~/.fonts makes them available for all the programs
that use fontconfig after you run:

    fc-cache -v

TeX and a few other applications (e.g. groff) have their own way of
handling fonts.  You may have to install them using a TeX-specific set
of commands.  Newer TeX-live installations support XeTeX too.  To use a
Truetype font in XeTeX you will need to copy the fonts to a path that is
visible during xetex/xelatex runs and add something like this in your
document's preamble:

    \usepackage{fontspec}
    \defaultfontfeatures{Mapping=tex-text}

    \setmainfont[Scale=0.9,
      BoldFont={*-Bold},
      ItalicFont={*-Italic},
      BoldItalicFont={*-BoldItalic}]
      {DejaVuSerifCondensed}
    \setsansfont[Scale=0.9,
      BoldFont={*-Bold},
      ItalicFont={*-Italic},
      BoldItalicFont={*-BoldItalic}]
      {DejaVuSansCondensed}
    % Monospace DejaVu fonts have to be scaled down a bit more than
    % their serif or sans-serif equivalents to look "nice" in print
    % output.
    \setmonofont[Scale=0.85,
      BoldFont={*-Bold},
      ItalicFont={*-Oblique},
      BoldItalicFont={*-BoldOblique}]
      {DejaVuSansMono}

    \usepackage{xunicode}
    \usepackage{xltxtra}

This is the preamble text I use to write XeTeX documents using the
DejaVu family of fonts.  The results are fantastic.  A sample of what
these fonts yield can be seen at:

    http://students.ceid.upatras.gr/~keramida/free.pdf

This is one of the books I converted from their HTML source to XeLaTeX
when I was learning to use TrueType and OpenType fonts in TeX.  Copying
the DejaVu fonts in the same directory as the TeX source makes them
immediately available to XeLaTeX.  This is nice because you can package
both the TeX source *and* the necessary fonts in the same archive :-)



More information about the freebsd-questions mailing list