Questions tagged [fontspec]
{fontspec} is a package for loading {opentype} fonts in XeLaTeX and LuaLaTeX.
2,041
questions
0
votes
0
answers
21
views
Package fontspec Error: The font "Lato-Lig" cannot be found. \setsansfont
I get this error Package fontspec Error: The font "Lato-Lig" cannot be found. \setsansfont when I run this code:
%!TEX TS-program = xelatex
\documentclass{article}
\usepackage[hmargin=1.25cm,...
9
votes
1
answer
575
views
Garamond Italic font: First capital letter looks strange
I am using the Garamond font, included by the fontspec package:
\usepackage{fontspec}
\setmainfont{Garamond}
In my opinion, the first capital letter in italics looks strange.
It does not fit to the ...
0
votes
0
answers
20
views
Load Black Chancery on Overleaf 2 [duplicate]
I'd like to load a new latex font, the Black Chancery on Overleaf. How must I do? Thank you so much
In a previous Question on this site (see here), I explained so my problem and I posted a code below.
...
0
votes
0
answers
33
views
Changing the fontsize of \large
I want to change the size of the font of \large. I tried a lot but everything removes Arial or even everything.
\documentclass[11pt]{scrartcl}
%Change font to Arial
\usepackage{fontspec}
\setmainfont{...
0
votes
0
answers
38
views
fontspec: \addfontfeatures does not work
In the example below, I add some features to the default LaTeX font by \addfontfeatures and compiled by XeLatex, but all of these features does not work. Why and how to make them work?
\documentclass{...
0
votes
0
answers
23
views
How do I change the font type in the table of contents in LyX
Hi all I would like to change the font type of my table of contents of a document written in LyX to Calibri (I have it installed and the rest of my document is in calibri)
Document class: Article
Page ...
0
votes
1
answer
38
views
How to change the main font for the wiley-article class
I'm writing an article and want to change the main font from "Lato" to "Strix Two Text". The code below is pre-defined (wiley-article template) and I'm struggling with the change.
%...
0
votes
0
answers
39
views
What must be done before using unicode-math?
My attempt to compile the following example using LuaLaTeX:
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
\end{document}
fails to typeset, and produces the following error log:
...
-1
votes
0
answers
50
views
How do I change the TeX engine in TexMaker?
I'm using TexMaker to compile a few files with the include command. I have made some changes in the formatting and it might have caused the error but I can't seem to get it to work again.
I'm using ...
0
votes
0
answers
65
views
Square root symbol from this book
Is there a way to use the square root symbol used in the book "Elementary Number Theory" by Edmund Landau? Check the image attached for an example.
2
votes
1
answer
69
views
LuaLaTeX fails to render Nepali properly, how can I fix it?
I'm not that hot with fontspec and friends, so took most from this answer about Nepali verbatim:
How to write Nepali and English on the same page in Overleaf
Here's my slightly edited code:
\...
1
vote
2
answers
57
views
Package unicode-math Error: Command `\epsilon ` in math range is not(unicode-math) commands
Whenever I try the following command, I get this error:
\documentclass{article}
\usepackage[no-math]{fontspec}
\usepackage{unicode-math}
\setmainfont{Old Standard}
\setmathfont{OldStandard-Regular....
0
votes
1
answer
59
views
Lucida font installation
I bought the Lucida OTF fonts from tug. I want to use them on a Linux system with LuaLaTeX. The installation instructions mention the following:
The installation documentation is in these (plain ...
0
votes
1
answer
69
views
Fatal Package fontspec Error: The fontspec package requires either XeTeX or (fontspec) LuaTeX
My setup is : vscode , miktek 4.7 ,strawberry perl, windows 10
I am new in latex , I can not figure out how to build pdf
2
votes
2
answers
139
views
newtx conflicts with fontspec in TeX Live 2022
After upgrading to TeX Live 2022, I found a lot of my previous code broken due to the clash between newtx and fontspec. Here is a minimal example (The engine is XeLaTeX under Windows):
\documentclass[...
0
votes
0
answers
34
views
How do I create a LaTeX document with three types of fonts? [duplicate]
Dear friends: This may be an easy thing for you to do - but I don't know how to do it.
For a Question Bank I am preparing for my students, I like to keep the Title Content in one font (type A), ...
0
votes
0
answers
43
views
pdfTex error: invalid font identifier. Metric (TFM) file not found
I am using the LawTeX template: LawTeX. When I try to compile the PDF, I get a pdfTeX error:
invalid font identifier. Font T1/pnc/m/n/10-pncr8t at 10.Opt not loadable: Metric (TFM) file not found. ...
3
votes
1
answer
141
views
What is the meaning of \C in xelatex and/or fontspec?
For a long time, I've used \newcommand{\C}{\mathbb{C}} in the preamble of my documents compiled with pdflatex to shorten the command needed to create the symbol for the complex numbers. Now I have a ...
0
votes
2
answers
47
views
fontspec: Changing number style also affects letters
I would like to have Small Caps font with Lining numbers. For this I set SmallCapsFeatures = { Numbers = Lining }. However, with this, the letters are no longer Small Caps. Is there any way to set the ...
1
vote
1
answer
80
views
Using Variable Glyphs with fontspec
I would like to access some alternative glyph forms using fontspec. To be specific I am using the font Garamond Premier Pro and I would like to use the alternative forms of Q (Glyph 245), W (Glyph 246)...
2
votes
1
answer
65
views
Defining a fallback font for all missing characters
I need access to Emoji characters for a little package I am currently writing. Is there a way of having a fallback font in XeLaTeX for whenever a random character is not available in the standard font?...
1
vote
1
answer
50
views
fontspec warning about fonts when using xelatex as compiler
I use the following in my preamble: \usepackage[times]{fontsetup}. Document is compiled with xelatex. Everything goes well, but I'm worried about warnings:
Package fontspec Warning: Font "...
0
votes
1
answer
33
views
Importing mathcal from a font alongside another
I would like to import the mathcal font from DejaVu Math TeX Gyre without overwriting the mathcal font of my global math font. I assumed I could just do:
\newfontfamily\djmathfont{DejaVu Math TeX ...
2
votes
2
answers
114
views
newpx makes fontspec fail
If I use the newpx package and then load fontspec and try to select a font it fails. See the minimal example below.
The files (compiled with lualatex) for which fontspec font selection fails (by ...
0
votes
0
answers
45
views
Multiple fonts families throughout the document
I know this question has already been answered here
How do I use a particular font for a small section of text in my document?
I understand that in order to use additional font with XeLaTeX and ...
2
votes
1
answer
120
views
LuaLaTeX: String substitution only in text (not in code and commands)
You can perform a string substitution with Lua code using gsub (see this answer).
With \AtBeginDocument you can limit the scope of the function to the document. But is it also possible to have the ...
0
votes
2
answers
93
views
How to write Nepali and English on the same page in Overleaf
\documentclass{report}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{Nepali}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\newfontfamily\devanagarifont[Script=...
2
votes
1
answer
86
views
Weird behavior when using \babelfont with two styles in LuaTeX
Consider these MWEs.
\documentclass{article}
\usepackage[english]{babel}
\babelprovide[onchar=ids fonts]{english}
\babelprovide[main,import]{thai}
\usepackage{fontspec}
% \babelfont[thai]{rm}[
% ...
1
vote
0
answers
45
views
Wrong font type in pdf document
I want to use DMSans for my document:
% !TeX program = lualatex
\documentclass{scrartcl}
\usepackage{lipsum}
\usepackage{fontspec}
\setmainfont{DMSans}[Extension=.ttf,
UprightFont=*-Regular,
BoldFont=...
0
votes
1
answer
40
views
XeLaTeX how to produce roughness or irregularities of old printing?
I have been pretty successful in copying the antique style of old books which I described here: How to generate old antique style books in LaTeX
However, one thing is still missing. The roughness or ...
1
vote
0
answers
37
views
Numbers in scshape with font Palatino Linotype
I recently noticed that with font Palatino Linotype, the numbers in \scshape appear to be quite small, as you can see from the section titles in the example below. Is there some way to make the ...
-1
votes
1
answer
57
views
Fatal Package fontspec Error [closed]
I am working on texstudio.
\documentclass{article}
\usepackage{polyglossia}
\usepackage{fontspec}
\newfontfamily\arebicfont[sript=Arabic]{Amiri}
\begin{document}
...
2
votes
1
answer
131
views
MLModern with fontspec using LuaLaTeX
I'd like to typeset a document in MLModern's fonts (serif, sans serif, teletype, etc.), then later change the teletype font to a different custom font whose TTF I provide (Iosevka, in the example ...
4
votes
1
answer
209
views
Cannot render a card face 🂡
I'm failing at rendering a card face: https://www.compart.com/en/unicode/U+1F0A1
\documentclass{article}
\begin{document}
card face: '🂡'
\end{document}
In my PDF I'm getting an empty character and ...
7
votes
2
answers
329
views
How to use the \emph or \textit in LuaLaTeX?
%!TeX lualatex
\documentclass[a4paper,14pt]{extbook} % to be able to print 14pt fonts
\pagenumbering{gobble}
\usepackage{fontspec}
\newfontfamily{\Termes}{TeXGyreTermes-Regular}
\newfontfamily{\...
1
vote
1
answer
81
views
NewComputerModern Boldface and Smallcaps in German Language
I am loading NCM (New Computer Modern) with
\documentclass{scrartcl}
\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands]{german}
\setotherlanguage[variant=british]{english}
%%%%%%%%%%%%%%%%%...
0
votes
0
answers
31
views
Choose and use accent from another font without specifying the fontname every time
I want to import all accents from another font in XeLaTeX. I can import specific letters from another font using xetex, like the example below. But if the font used in fontspec does not have the ...
0
votes
0
answers
41
views
Small caps bold
I downloaded and installed this font on my pc. In particular, I should have the normal, bold and semibold-italic versions.
On latex, I tried to insert some text as small caps bold in this font, but it ...
2
votes
1
answer
47
views
Confusing bug in koma-script when using fontspec, \listoffigures, and cross-refs
I came across a weird bug in KOMA-script when using the fontspec package (either LuaLaTeX/XeLaTeX) and cross-referencing. Rather than give an in-depth description up front, here's an example of the ...
12
votes
1
answer
496
views
Recursive Font, multiple axes, fontspec, texlive 2022
I've installed texlive 2022 pretest and play around with it.
I've found a font called Recursive, see here: https://fonts.google.com/specimen/Recursive#about and the website here: https://www.recursive....
1
vote
0
answers
30
views
Beamer set custom fonts but not used?
I am trying to make a template for my work at Uni.
I have set the fonts like so:
\setmainfont[
Path = uni/fonts/,
Extension = .otf,
Ligatures = TeX,
BoldFont =...
3
votes
1
answer
187
views
How to Avoid Fontspec When Invoking an External Font
I have recently downloaded a font from https://www.dafont.com, which, when I call it into my document, requires the fontspec package and compilation with lualatex. This has caused several problems, ...
0
votes
0
answers
41
views
Why the basic command like \textit{}, \emph{} ... do not work in my document?
\documentclass[a4paper, 12pt ]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
%\usepackage[french]{babel}
\setmainfont{Lucida Grande}
\newfontfamily{\He}{SBL Hebrew}
\setdefaultlanguage{...
0
votes
1
answer
60
views
How to change font for chapter, section, headings in Latex document?
Would like to preface this by saying that I am fairly new to Latex. My query is that I would like to change the font for my chapter, section and subsection headings to raleway while keeping the font ...
0
votes
2
answers
52
views
African language typo
please need to write this special caracter in latex:
(b, ɓ, c, d, ɗ, f, g, h, j, k, l, m, n, ny, ŋ, p, r, s, t, w, y, ƴ,’ mb, nd, ng, nj)''
thank for your help.
Table 6: Letters Used to Typeset ...
11
votes
0
answers
212
views
Optimising microtype for variable fonts
One can find the following passage on p. 27 of the microtype package documentation:
Don’t use too large a value for expansion. Font expansion is a feature that is
supposed to enhance the typographic ...
0
votes
0
answers
31
views
Lining/Proportional numbers in footnote marks
I am currently working on a Book and I need to use Lining, Proportional numbers for the footnotes superscript, not the footnote itself. I am using fontspec and the following fonts:
\setmainfont[...
3
votes
2
answers
112
views
A Non-Uniformly Spaced Display of \ldots. is Produced When Using Fontspec
Consider the following code which I compile with Lualatex:
\documentclass{book}
%\usepackage{fontspec}
\begin{document}
\LARGE
Some words\ldots. % ellipsis and period without fontspec
%Some words\...
1
vote
1
answer
52
views
fontspec + JuliaMono: missing glyphs in LuaLaTeX compared to XeLaTeX
I am trying to typeset a document that contains monospaced text with Greek-letter Unicode glyphs, e.g. alpha, beta, etc. To do so, I'm using the JuliaMono font, which has extensive support for mathy ...
0
votes
2
answers
47
views
MacOS Terminal says my template uses pdftex, but I set it up with xetex. What am I doing wrong?
MacOS 12.2
TexShop v.4.68
At the top of my template:
% !TEX TS-program = XeTeX
% !TEX encoding = UTF-8 Unicode
In the preamble, among other things:
\documentclass{article}
\usepackage{fontspec}
...