I am curious to know which font extensions works better when using XeLaTeX to compile a TeX document. I have just downloaded the font Alegreya from CPAN, and it comes with a fonts folder that includes folders with the font in several formats:
FOLDER FONT FILE EXTENSION
afm *.afm
enc *.enc
map just one file: Alegreya.map
pfm *.pfm
tfm *.tfm
truetype *.ttf
type1 *.pfb
vf *.vf
I know nothing about fonts and I didn't even know there were so many font formats out there in the wild, I have no idea what are they used for.
I tried type1 and truetype formats in my TeX document by adding:
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[ Path = ./alegreya/fonts/truetype/huerta/alegreya/,
Extension = .ttf,
BoldFont = Alegreya-Bold,
ItalicFont = Alegreya-Italic,
BoldItalicFont = Alegreya-BoldItalic,
SmallCapsFont = AlegreyaSC-Regular,
SmallCapsFeatures = {Letters = SmallCaps},
Numbers = OldStyle
]{Alegreya-Regular}
to the preamble of my document (same for type1 using Path = ./alegreya/fonts/truetype/huerta/alegreya/ and Extension = .pfb). Both formats work in the sense that I don't get any compilation errors and the PDF looks fine.
My question is: is there a preferred font to work with XeLaTeX that I should be using? What's the best practice regarding font embedding, if there is any? What should I use, ttf, pfb or other?
Cheers!
.ttfhere. Even better would be.otfbut you do not have this for your font. You may read a bit about fonts and about the different file-extensions. I guess that most of the named above are not even fonts but mappings, encodings, vectorgraphics and alike. Just guessing. – LaRiFaRi Sep 22 '14 at 13:00/usr/share/texlive/texmf-dist/fonts/in my case). Anyway, I prefer to use the font from the folder where I am creating the tex document, since I would like to share it with more people who could edit it even if, like me, they don't have the font installed in their system neither. Cheers! – Xirux Nefer Sep 22 '14 at 14:36