1

I am using LyX with TeX Live. I have tried to export a file with the fonts David CLM and Hadasim CLM. But the system writes that the fonts do not exist, even though I already installed them. Reconfiguration doesn't work. What can I do?

5
  • It’s hard to tell without more information. But, does Document→Settings→Fonts→Use non-TeX fonts (via XeTeX/LuaTeX) work?
    – Davislor
    Feb 1, 2021 at 16:23
  • Did this already, but the error still pops. Feb 1, 2021 at 16:27
  • How did you install them, and what OS? On Windows, you need to install fonts for all users (as an administrator) for LuaTeX/XeTeX to find them. On Mac, you need to install them to the System Font Book.
    – Davislor
    Feb 1, 2021 at 16:29
  • I use Windows. I just installed the fonts but LyX doesn't find them. Feb 1, 2021 at 16:30
  • What is luaotfload-tool --find "David CLM"? Feb 1, 2021 at 16:31

1 Answer 1

0

You say that you just installed them on Windows. On Windows, TeX cannot find fonts that you install the default way. You should go to the directory where you saved the font files, select all the font files, right-click, and “Install for All Users”.

If you don’t have administrator permissions, an alternative is to copy the files to a local TeX tree.

LuaLaTeX also has trouble with the naming scheme of some of these fonts, so this code might help you:

\defaultfontfeatures[DavidCLM]{
   Ligatures=Discretionary,
   UprightFont = {*-Medium},
   BoldFont = {*-Bold},
   ItalicFont = {*-MediumItalic},
   BoldItalicFont = {*-BoldItalic},
   Extension = {.otf}}
\defaultfontfeatures[HadasimCLM]{
   UprightFont = {*-Regular},
   BoldFont = {*-Bold},
   ItalicFont = {*-RegularOblique},
   BoldItalicFont = {*-BoldOblique},
   Extension = {.ttf}}

You can add these to your preamble (after loading fontspec, but before loading the fonts). You might instead want to save them to your project directory in files named DavidCLM.fontspec and HadasimCLM.fontspec, respectively. That will load the commands whenever you select the fonts DavidCLM and HadasimCLM.

These commands will give you a right-to-left slant on the oblique fonts. If you prefer a left-to-right slant, matching the Latin script, you can do this instead

\defaultfontfeatures[DavidCLM]{
   Ligatures=Discretionary,
   UprightFont = {*-Medium},
   BoldFont = {*-Bold},
   ItalicFont = {*-Medium},
   BoldItalicFont = {*-Bold},
   AutoFakeSlant = 0.2,
   Extension = {.otf}}
\defaultfontfeatures[HadasimCLM]{
   UprightFont = {*-Regular},
   BoldFont = {*-Bold},
   ItalicFont = {*-Regular},
   BoldItalicFont = {*-Bold},
   AutoFakeSlant = 0.2,
   Extension = {.ttf}}

You can check whether Luatex can find these fonts with the command-line tool luatofload-tool --find "David CLM Medium" and whether XeTeX can find them with fc-match "David CLM".

On LyX, make sure you’ve enabled Document→Settings→Fonts→Use non-TeX fonts (via XeTeX/LuaTeX)

4
  • The installed file is from here: culmus.sourceforge.net/download.html. I had to extract them since it is a zip-file. I just chose "install for all users" and it works fine. Thank you very much. I am not familiar with latex so I prefered the first way. Feb 1, 2021 at 16:58
  • @YoavAvidan I don’t think your link copied over. Regardless of where you downloaded them, you need to install them for all users for fontspec to find them on Windows.
    – Davislor
    Feb 1, 2021 at 17:00
  • Should I insert one of these codes to the LaTeX premable? Feb 1, 2021 at 17:03
  • @YoavAvidan Inserting both should work. What might be even better is saving the [DavidCLM] command in a file in your project directory named DavidCLM.fontspec, and the [HadasimCLM] command as HadasimCLM.fontspec. Then you can just use the font names DavidCLM or HadasimCLM in your document.
    – Davislor
    Feb 1, 2021 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .