Keith Briggs

This page was last modified 2024-01-21  

.
.


home 
·publications 
·thesis 
·talks 
·meetings 
·records 
·maths notes « 
·software 
·languages 
·music 
·travel 
·cv 
·memberships 
·students 
·maps 
·place-names 
·people 
·photos 
·links 
·ex libris 
·site map 


.

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:

  1. save this file as T1-WGL4.enc
  2. save this script as make_font.sh and make it executable
  3. run ./make_font.sh trajanr
  4. run acroread trajanr.pdf and make sure the Trajan font worked. It should look something like this
  5. save this script as install_font.sh and make it executable
  6. do as root:
    • ./install_font.sh trajanr
    • texhash
  7. 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
  8. 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 Keith Briggs private email address.