I have recently started experimenting with LaTeX and have come to a point where I need to use my custom fonts with pdfLaTeX. I know I would have less trouble with XeLaTeX but I would like to be able to use the microtype package. I managed to convert my custom fonts to use with LaTeX, but I seem to have lost important functionality!
According to these two tutorials
http://fachschaft.physik.uni-greifswald ... h/ttf.html
http://existentialtype.net/tag/ttf2tfm/
I processed my ttf font files with ttf2afm and afm2tfm.
Code: Select all
ttf2afm -e custom.enc -o GoudyBkltModernR.afm GoudyBkltModernR.ttf
afm2tfm GoudyBkltModernR.afm -t custom.enc
I built a custom.map file, with one entry for each font series/shape, like:
Code: Select all
GoudyBkltModernR <custom.enc <GoudyBkltModernR.ttf
Code: Select all
\ProvidesFile{uenc.def}
\DeclareFontEncoding{U}{}{}
\DeclareTextSymbol{\textasteriskcentered}{U}{42}
\DeclareTextSymbol{\textbackslash}{U}{92}
\DeclareTextSymbol{\textcopyright}{U}{254}
\DeclareTextSymbol{\textmult}{U}{255}
Code: Select all
\ProvidesFile{UGoudyBookletter1911.fd}
\DeclareFontFamily{U}{GoudyBookletter1911}{}
\DeclareFontShape{U}{GoudyBookletter1911}{m}{n}{ <-> GoudyBkltModernR}{}
\DeclareFontShape{U}{GoudyBookletter1911}{b}{n}{ <-> GoudyBkltModernB}{}
\DeclareFontShape{U}{GoudyBookletter1911}{m}{it}{ <-> GoudyBkltModernIt}{}
\DeclareFontShape{U}{GoudyBookletter1911}{mo}{n}{ <-> GoudyBkltOldstyleR}{}
\DeclareFontShape{U}{GoudyBookletter1911}{bo}{n}{ <-> GoudyBkltOldstyleB}{}
\DeclareFontShape{U}{GoudyBookletter1911}{mo}{it}{ <-> GoudyBkltOldstyleIt}{}
\DeclareFontShape{U}{GoudyBookletter1911}{bx}{n}{ <->ssub* GoudyBookletter1911/b/n}{}
\DeclareFontShape{U}{GoudyBookletter1911}{m}{sl}{ <->ssub* GoudyBookletter1911/m/it}{}
\DeclareFontShape{U}{GoudyBookletter1911}{b}{it}{ <->ssub* GoudyBookletter1911/b/n}{}
Code: Select all
\usepackage[U]{fontenc}
\pdfmapfile{+custom.map}
\renewcommand{\rmdefault}{GoudyBookletter1911}
Code: Select all
\documentclass{book}%
\usepackage[U]{fontenc}
\pdfmapfile{=custom.map}
\renewcommand{\rmdefault}{GoudyBookletter1911}
\begin{document}
\frontmatter
\chapter{Introduction}
The field offer affinity fluent efflux frozen after fury attention Tell
\end{document}
Thanks a lot in advance!