Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use TrueType fonts with LaTeX

I need to use a font family in my LaTeX documents, that is available as 18 .TTF (TrueTypeFont) files.

Where do I have to copy the files in my MiKTeX 2.8 installation? How Do I make the fonts available for LaTeX?

I usually use pdfLaTeX. I read in Truetype-Fonts in LaTeX that TTF fonts are available without creating all the .TFM files. What is necessary for this case?

Can I install the fonts in the local-texfm directory? I would like to isolate the system installation and my manually added stuff. Probably it would be easier to copy this font family on another installation.

like image 216
harper Avatar asked Mar 26 '10 18:03

harper


People also ask

Where do I put TrueType fonts?

As an alternative, you can install any TrueType font by dragging the *. ttf file into the Add Fonts box at the top of the Fonts page in Settings.

Which font style is used in LaTeX?

By default, LaTeX uses Computer Modern, a family of typefaces designed by Donald Knuth for use with TeX.

How do TrueType fonts work?

TrueType fonts describe each glyph as a set of paths. A path is simply a closed curve specified using points and particular mathematics. A lower case 'i' has two paths, one for the dot and one for the rest of it. The paths are filled with pixels to create the final letter form.


1 Answers

The easiest way would be to use XeLaTeX, for which you would just install the fonts to your system. A basic template would look like this (from https://web.archive.org/web/20111115151939/http://theotex.blogspot.com/2008/04/what-is-xetex-basic-template_15.html) :

%!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[10pt]{memoir} \usepackage{xltxtra,fontspec,xunicode} \defaultfontfeatures{Scale=MatchLowercase} \setromanfont[Numbers=Uppercase]{Hoefler Text} \setmonofont[Scale=0.90,Ligatures=NoCommon]{Courier}  \title{Your Title} \author{Your Name} \date{}  \begin{document}  \maketitle \chapter{Title}  \section{Section Title} Your text  \subsection{Subsection Title} Your Text \end{document} 
like image 136
Mica Avatar answered Oct 01 '22 19:10

Mica