Using truetype fonts with pdflatex
Various websites describing how to do this are out-of-date.
This procedure worked for me with the tetex 3.0 distribution.
You might need to switch on local searching (i.e. in /usr/local/share/texmf/) in texmf.cnf. See here for more on this.
warning: these scripts do no error checking. Use with care.
Also, this is mostly a hack. Do not expect proper handling of all font
sizes. Certain glyphs (like 'ffi') may not work, and unicode support
has not been considered.
Suppose you have a file trajanr.ttf which you'd like to use with
pdflatex. Follow these steps as a normal user in a temporary directory:
- save this file as T1-WGL4.enc
- save this script as make_font.sh
and make it executable
- run ./make_font.sh trajanr
- run acroread trajanr.pdf and make sure the Trajan font worked.
It should look something like this
- save this script as install_font.sh
and make it executable
- do as root:
- ./install_font.sh trajanr
- texhash
- do as root:
- mkdir -p /usr/local/share/texmf/fonts/enc/dvips/unknown
- mv T1-WGL4.enc /usr/local/share/texmf/fonts/enc/dvips/unknown
- run pdflatex trajanr.tex && acroread trajanr.pdf and make sure the Trajan font still works
Repeat steps 3, 4 and 6 for each font you want to install.
You can now delete the temporary directory.
This website uses no cookies. This page was last modified 2024-01-21 10:57
by .