For the longest time, I have written LaTeX documents on Unix or Linux. Due to several reasons, I'm actively planning to move this to Mac. I installed Mactex, Linux Libertine fonts, RomDev.tec and sanskrit 2003.ttf fonts.
My document uses Linux Libertine and several Indian language fonts, most important being Sanskrit 2003 (ttf).
To transliterate Sanskrit, I use Somadeva Vasudeva's RomDev scheme that uses a mapping file.
Here is a MWE that works on linux but not on the mac, I get fontspec error: "font-not-found"
The font "Linux Libertine" cannot be found
I believe I have all the required fonts in my mac. How do I verify if they are a) present and b) configured for xelatex
to find them.
\documentclass[12pt]{article}
\usepackage{polyglossia} % the multilingual support package
\usepackage{parskip}
\usepackage{booktabs}
\setdefaultlanguage{english} % this is mostly going to be English text, with
\setotherlanguage{sanskrit} % some Sanskrit embedded in it.
\usepackage{xltxtra} % standard for nearly all XeLaTeX documents
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont[Ligatures=TeX,
ItalicFont={TeX Gyre Schola Italic},
BoldItalicFont={TeX Gyre Pagella Bold Italic}]
{Linux Libertine O}
\setsansfont[Ligatures=TeX, Scale=0.9]{Linux Biolinum O}
\setlength{\parskip}{12pt} % 1ex plus 0.5ex minus 0.2ex}
\newfontfamily\devanagarifont{Linux Libertine}
\setlength{\textwidth}{5.5in}
\newfontinstance
\sanskritunicode [Script=Devanagari,Mapping=RomDev]{Sanskrit 2003}
\newcommand\skt[2]{\textsanskrit{#1#2}}
\newcommand\sktuni{\skt\sanskritunicode}
\newfontfamily\sa{Sanskrit 2003:script=deva}% Write Devanagari natively
\newenvironment{sanskrittext}%
{\leftskip=1em \rightskip=1em }%
{\ifhmode \par \fi}
\newcommand\sloka[1]{\begin{sanskrittext}\setlength{\parindent}{0pt}{\large \skt
{\normalsize \textit{#1}}\end{sanskrittext}\medskip}
\setlength\heavyrulewidth{1.5pt}
\newcommand{\otoprule}{\midrule[\heavyrulewidth]}
\begin{document}
{\Large \sa ॐ }
Everything is rooted in time, kāla:\\
\sloka{
kālamūlamidaṃ sarvaṃ bhāvābhāvau sukhāsukhe
}
\end{document}
/Library/Fonts
folder in order that XeTeX can find them by name. Notice thatxltxtra
is needed for a really small number of documents nowadays. Just loadfontspec
instead.