0

I'm trying to use fontspec to load a font like this:

\usepackage{fontspec}
  \setmainfont{SetoFont}

Compiling it with LuaLaTex gives the following compiler log:

Rc files read:
  NONE
Latexmk: This is Latexmk, John Collins, 17 Mar. 2022. Version 4.77, version: 4.77.
Latexmk: applying rule 'lualatex'...
Rule 'lualatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
  /home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex
Rule 'lualatex': The following rules & subrules became out-of-date:
  lualatex
------------
Run number 1 of rule 'lualatex'
------------
------------
Running 'lualatex  -synctex=1 -interaction=nonstopmode -file-line-error -recorder  "/home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex"'
------------
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022/Arch Linux) 
 restricted system commands enabled.
(/home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex
LaTeX2e <2021-11-15> patch level 1
 L3 programming layer <2022-04-10> (/usr/share/texmf-dist/tex/latex/base/report.cls
Document Class: report 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo)) (/usr/share/texmf-dist/tex/latex/geometry/geometry.sty (/usr/share/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texmf-dist/tex/generic/iftex/ifvtex.sty (/usr/share/texmf-dist/tex/generic/iftex/iftex.sty)))

Package geometry Warning: Over-specification in `h'-direction.
    `width' (483.69684pt) is ignored.


Package geometry Warning: Over-specification in `v'-direction.
    `height' (731.23582pt) is ignored.

(/usr/share/texmf-dist/tex/latex/microtype/microtype.sty (/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (/usr/share/texmf-dist/tex/latex/microtype/microtype-luatex.def) (/usr/share/texmf-dist/tex/latex/microtype/microtype.cfg)) (/usr/share/texmf-dist/tex/latex/greek-fontenc/textalpha.sty (/usr/share/texmf-dist/tex/latex/greek-fontenc/tuenc-greek.def (/usr/share/texmf-dist/tex/latex/greek-fontenc/greek-fontenc.def))) (/usr/share/texmf-dist/tex/generic/babel/babel.sty (/usr/share/texmf-dist/tex/generic/babel/luababel.def) (/usr/share/texmf-dist/tex/generic/babel/luababel.def) (/usr/share/texmf-dist/tex/generic/babel-english/english.ldf)) (/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty (/usr/share/texmf-dist/tex/latex/graphics-cfg/color.cfg) (/usr/share/texmf-dist/tex/latex/graphics-def/luatex.def) (/usr/share/texmf-dist/tex/latex/graphics/dvipsnam.def)) (/usr/share/texmf-dist/tex/latex/titlesec/titlesec.sty) (/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/share/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/share/texmf-dist/tex/latex/l3backend/l3backend-luatex.def))) (/usr/share/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty (/usr/share/texmf-dist/tex/latex/base/fontenc.sty) (/usr/share/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "SetoFont" not found.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.

/home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex:31: Package fontspec Error: The font "SetoFont" cannot be found.

For immediate help type H <return>.
 ...                                              
                                                  
l.31 
   

luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.

/home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex:31: Package fontspec Error: The font "SetoFont" cannot be found.

For immediate help type H <return>.
 ...                                              
                                                  
l.31 
   

luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.

/home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex:31: Package fontspec Error: The font "SetoFont" cannot be found.

For immediate help type H <return>.
 ...                                              
                                                  
l.31 
   

luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
/home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex:31: Font \TU/SetoFont(0)/m/n/10=SetoFont:mode=node;language=dflt;+tlig; at 10pt not loadable: metric data not found or bad.
<to be read again> 
relax 
l.31 
   
(./00_main.aux) (/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)
*geometry* driver: auto-detecting
*geometry* detected driver: luatex
/home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex:38: error:  (pdf backend): invalid font identifier when asking 'fontsize'
/home/arnob99/Documents/university/bio/bio_notes/lectures/gene_expression/00_main.tex:38:  ==> Fatal error occurred, no output PDF file produced!Latexmk: If appropriate, the -f option can be used to get latexmk
  to try to force complete processing.
Latexmk: Getting log file '00_main.log'
Latexmk: Examining '00_main.fls'
Latexmk: Examining '00_main.log'
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  lualatex: Command for 'lualatex' gave return code 1
      Refer to '00_main.log' for details

I installed TexLive using pacman (Arch Linux) (texlive-bin, texlive-most, and texlive-langgreek). The LaTeX code works perfectly well in Overleaf, so I assume I just need to install another package with pacman, but I can't for the life of me find out which one.

EDIT:

I forgot to mention, I tried a couple other fonts, none of which seemed to work.

3
  • For this to work, SetoFont needs to be installed in a place where LuaLaTeX can actually find it, the font cache needs to be up to date and the font name needs to be SetoFont. What happens when you put setofont.ttf in your current working directory, and use \setmainfont{setofont.ttf} ?
    – Ingmar
    Jun 14, 2022 at 12:36
  • Stupid question, but are you sure the fonts you tried are installed on your system? Fontspec can look for fonts in your operating system's global font folder, so if the fonts are available, they should be visible from other applications.
    – Miyase
    Jun 14, 2022 at 12:37
  • @Miyase Ah, thanks. I thought the fonts were included in fontspec since they are listed in the documentation of the package. That did the trick.
    – dogsoahC
    Jun 14, 2022 at 12:58

0

You must log in to answer this question.

Browse other questions tagged .