problem using newfontfamily with lualatex; TeXLive; linux

by nate   Last Updated January 14, 2018 00:23 AM

I am using Linux Mint, with new TeXLive (installed in special location) to try and compile this template I found. I've tried using the discussion in both, and `How do I use a particular font for a small section of text in my document?'.



\newdimen\tempdima \tempdima0pt
%\newdimen\maxdatedimen \maxdatedimen30pt%default value
\newdimen\maxdatedimen \maxdatedimen30pt%default value

    \parbox[t]{\datebox}{\strut\small\itshape #1}%
    \parbox[t]{\dimexpr\textwidth-2em-\datebox-1.5em+0em}{\strut #2}%

%  \par\noindent\hangindent=2em\hangafter=0
  {\noindent\ignorespaces\footnotesize #1\par}
%  {\raggedright\footnotesize #1\par}


  \settowidth{\datebox}{\hbox to \the\maxdatedimen{\hfil}}



%\newcommand\fontMy[1]{{\fMy #1}}


\begin{cv}{My name}\vspace{1.5em}

Dear Human Resources,

\pagestyle{scrheadings}% using scrheadings page style

\section*{Personal Information}



\NewEntry{2015-2017}{{\myfontt \textbf{School of Data Analysis, Yandex}}}



The template works fine but I wanted to use differnt fonts in various places. So, despite these two links being different ways to implement this (at least with syntax), I still couldn't get them to work - using for example Cormorant Garmond. I did add the extension and had fontspec so I can use the file name.

Perhaps I need to specify a search path explicitly? Or can I include an absolute path name to the file?

Here is the root of my TeXLive installation - /home/user/SW/TeXLive and the file I was looking for was found by;

X@X ~/SW/TeXLive/here/texmf-dist/fonts $ find . -name 'CormorantGaramond*.otf' -exec ls -Alrt {} \;
-rw-r--r-- 1 sbh sbh 775548 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-MediumItalic.otf
-rw-r--r-- 1 sbh sbh 780596 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-LightItalic.otf
-rw-r--r-- 1 sbh sbh 1129176 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-Regular.otf
-rw-r--r-- 1 sbh sbh 1135248 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-SemiBold.otf
-rw-r--r-- 1 sbh sbh 1119544 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-Bold.otf
-rw-r--r-- 1 sbh sbh 782440 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-RegularItalic.otf
-rw-r--r-- 1 sbh sbh 782208 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-SemiBoldItalic.otf
-rw-r--r-- 1 sbh sbh 1113548 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-Medium.otf
-rw-r--r-- 1 sbh sbh 760204 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-BoldItalic.otf
-rw-r--r-- 1 sbh sbh 1126740 Nov 25  2016 ./opentype/catharsis/cormorantgaramond/CormorantGaramond-Light.otf

The part of the MWE I'm trying to use is the commented out stuff just before the beginning of the document. I've had no real problems (despite some weird errors) using the other font, FoglihentPCS-068.otf, but that is because it is in the same directory - I'd rather use an absolute path.

I'm fine using either approach - an environment with \begin{myfont} \lipsum[3] \end{myfont} or just a {\fMy lipsum[3]} method, though I'd prefer the latter.

Tags : fonts luatex linux

Related Questions

(Lua) LaTeX & HeVeA with partly generated things

Updated May 03, 2018 14:23 PM

LuaTeX error: LuaTeXbase-loader.sty

Updated February 10, 2018 21:23 PM

LuaLaTeX not recognised as a VS Code tool

Updated October 18, 2018 09:23 AM