Questions tagged [fontspec]
{fontspec} is a package for loading {opentype} fonts in XeLaTeX and LuaLaTeX.
2,155
questions
0
votes
1
answer
22
views
fontspec's SizeFeatures doesn't scale bold face
Suppose I want to scale down the English text in proportion to Hebrew text in my document.
To do that I use SizeFeatures in the following way:
% !TEX TS-program = xelatex
\documentclass{article}
\...
3
votes
2
answers
165
views
fontspec and EB Garamond: Cannot use EBGaramond12-Italic
I dowloaded EB Garamond from https://github.com/georgd/EB-Garamond/releases/tag/nightly and copied all fonts, .otf and .ttf to ~/.fonts/e
The typeface contains different font files for the optical ...
4
votes
1
answer
123
views
Unable to Disable `colr` Feature With HarfBuzz Renderer From the `fontspec` Package
I noticed that if you use the Renderer = HarfBuzz fontspec option, the colr OpenType feature automatically gets disabled. If you use the default renderer, the feature does not get enabled but you can ...
1
vote
1
answer
42
views
How can I switch back to Computer Modern in formulas within XeLaTeX?
Answers to the question Switching back to Computer Modern within XeLaTeX provides a way to switch back to the default font in XeLaTex. However, the solution there doesn't work if I use \mathrm in a ...
4
votes
1
answer
122
views
Set Numbers in Small Caps by Default
I am using the fontspec package with LuaLaTeX. I'm curious if there is a way to automatically set numbers in small caps by default similar to how you can set numbers in OldStyle/Lowercase by default ...
1
vote
2
answers
31
views
Bold Small Caps in all sections, using lmodern default package
I am writing a document using lmodern package and I need to redefine all sections in order to be bolded and in small caps.
I cannot change the lmodern font for another one including bold small caps ...
0
votes
0
answers
18
views
How to use custom fonts using fontfamily in Overleaf?
General description
I have a working project that I use locally via TeXMaker and TeXLive. Now I wanted to move the project to Overleaf, but struggle to fix the error:
<to be read again>
...
1
vote
1
answer
43
views
Line breaks don't work properly when fontspec uses as main font some fonts different from default Latex font
I have the following code setting as main font GFSArtemisia containing just two paragraphs of text with some empty spaces to be completed from students. I noticed that if I use as main font some fonts ...
0
votes
0
answers
28
views
Overleaf Error: "The font "Fira Math Bold" cannot be found" using provided cls file
I am writing my thesis using a template provided by school. The template is meant to be used locally (e.g. with TexStudio) but I'm using Overleaf with the XeLaTeX compiler.
When I compile the document ...
1
vote
0
answers
33
views
Change bold math font with mathspec
I want to change the math font by mathspec. My code is
\documentclass{article}
\usepackage{mathspec}
\setmathsfont(Latin,Greek){Eu-bx.ttf}
\setmathsfont(Digits){EU-bz.ttf}
\usepackage{fontspec}
\...
1
vote
0
answers
33
views
What are the effects of using `Script=foo' parameter in fontspec?
What settings get added when Script=foo parameter is
passed to font commands with fontspec? Are those settings
related to fonts or related to LaTeX only? Are there any
adverse effects of loading the ...
2
votes
1
answer
81
views
Lualatex — Memory exhausted (xmalloc)
I am putting together a collection of songs from around the world. I am using fontspec in lualatex with Tex Live on Windows 11 with 16GB of RAM. I am compiling the document variously by using a latex-...
0
votes
0
answers
27
views
beamer and verbatimbox in multi language document
I need to place some text, as it is, with highlighting the first line, and other random such features. verbatimbox seems the right candidate. The document is a multilanguage one, using polyglossia.
...
1
vote
0
answers
34
views
Get sans font in pgfplots tick scale labels
I use the fontspec package and the objective is to have a consistent font in the pgfplots diagrams. Sometimes, I have tick scale labels due to the magnitude of the respective axis. Changing the font ...
1
vote
1
answer
35
views
How can I load a different style of a font as its bold font
I am using the Junicode Two Beta VF typeface for my document. It comes with only two files, one for roman and one for italic. But if I run fc-list, I notice that the font includes a bold style through ...
0
votes
0
answers
22
views
XeTeX/fontspec: using FontFace option for weights in .fontspec files
I know I can define fonts with their weights such as:
\setromanfont{Alegreya}[
FontFace={sb}{n}{Font=* SemiBold},
FontFace={eb}{n}{Font=* ExtraBold},
FontFace={xb}{n}{Font=* Black},
FontFace={...
0
votes
0
answers
29
views
Package fontspec Error: The font "CharisSIL-R" cannot be found
I have a package, suppose mydummypackage . When I compile the package I get the following errors:
Line 10: ! Package fontspec Error: The font "CharisSIL-R" cannot be found.
Line 12: ! ...
1
vote
1
answer
45
views
LuaLaTeX: Numito doesn't print Greek characters in chemformula (chemmacro)
In my migration of my documents from PDFLatex to LuaLatex I came across an odd behaviour of chemgreek when used with the font packages Numito and XITS.
When I set the font format in chemformula to \...
1
vote
0
answers
43
views
The key 'fontspec-opentype/FeatureFile' is unknown and is being ignored
I recently dug up an old project and tried to compile it. Seems something has changed because it claims:
! LaTeX3 Error: The key 'fontspec-opentype/FeatureFile' is unknown and is
(LaTeX3) being ...
2
votes
1
answer
63
views
URL removes Slashed Zero
I am using the fontspec and xurl packages. I have found that the command \url removes the Numbers=SlashedZero OpenType feature. Obviously, I want the Slashed Zero to work, even when typesetting urls.
...
0
votes
0
answers
44
views
How to use a custom font from LuaLaTeX with coloredlettrine?
I have installed a new custom font (OTF & TTF); and I would like to use it with the package coloredlettrine.
Which steps would I need to follow to be able to use it?
MWE:
\documentclass{memoir}
\...
0
votes
0
answers
56
views
How to add an extra-space before a question mark?
Using Adobe Garamond Pro, I don't get an extra space mark before a question mark. In French, it is absolutely required. Using Word, I don't have the same issue. Should I resolve myself to go back to ...
2
votes
1
answer
45
views
How to change the font of only chapter titles and subsections?
I'm trying to change the font of my chapter titles and subsections but none of the examples online are working for me. Here is my current code and the typesetting it generates. How do I change the ...
1
vote
1
answer
94
views
LuaLaTeX with OpenType and microtype, create microtype configuration on the fly?
I am using LuaLaTeX (>=2022), OpenType fonts, microtype. Platform is Linux. I have permission to write files in the same directory (or subdirectory) as my main *.tex document. I cannot use --shell-...
1
vote
1
answer
48
views
Changing the teletype font to custom font family does not work?
I'm trying to change the default teletype font \texttt to courier new using the corresponding .ttf file and \newfontfamily. Unfortunately, no matter what combination of commands I try, using \...
1
vote
0
answers
38
views
Courier New monospace font not found by fontspec in Overleaf?
I'm trying to use the Courier New font via setmonofont and the fontspec package, but for some reason, Overleaf relentlessly states that the font is unavailable. I cannot use the courier package ...
1
vote
1
answer
65
views
Use font from usepackage in setmainfont
how do I correctly set a main and mono font for my document when the font is imported with \usepackage ?
I am using lualatex.
I tried setting it like this:
\usepackage{stix2}
\usepackage{sourcecodepro}...
0
votes
0
answers
35
views
Problem with loading additional ttf fonts, specifically mfizz
I am using the Kile IDE, compiling with PdfLatex. I am not using fontspec because it seems to be overly complicated for what I have been doing; I tried switching to fontspec, with many variations, and ...
1
vote
1
answer
33
views
How can I redefine normal font as semi-bold in xetex?
Here is the Latex code:
\documentclass[12 pt]{extarticle}
\usepackage{fouriernc}
\usepackage[T1]{fontenc}
\usepackage[svgnames]{xcolor}
\begin{document}
\color{...
0
votes
0
answers
45
views
GFSArtemisia vs GFSArtemisia-euler: difference in appearance of the artemisia font
In an earlier question (Amstext (chemmacros) causes problems in selecting math fonts in chemfig) egreg mentioned the use of txfonts loaded by GFSArtemisia can cause issues. The alternative package ...
0
votes
0
answers
43
views
How to properly use `\fontfamily` with `fontspec` and `lualatex`
For my thesis I'm being asked to use a specific latex template.
This template includes several invocations of the style:
\fontfamily{cmss}\fontseries{m}\fontsize{22}{26}\selectfont
and
\fontfamily{...
0
votes
0
answers
39
views
Setting several fonts in Latex Overleaf
I am trying to create a document using my company's own font. There are 4 ttf-extension fonts: normal, bold, italic, and bold-italic. How can I use all of them in my document and have the section ...
1
vote
1
answer
56
views
Texstudio does not recognize a font (STIX Two) in \fontspec package
I am using Texstudio with miktex and lualatex, both of which I downloaded yesterday. I had a file that compiled perfectly on overleaf, but here a thousand errors pop up when I try to run the code. ...
5
votes
1
answer
359
views
Color SVG font not displaying in color in LuaLaTeX
I am using this test font, which supposedly should have colors for the letters abcdeABCDE: https://github.com/faiuwle/qucheanya/blob/main/ColorFont-SVG.ttf
This is what I'm trying:
\documentclass{...
3
votes
0
answers
43
views
fontspec not recognizing custom bold font
I'm trying to convert a persian book written in MS Word to LaTeX (i'm using Overleaf as i'm a noob) and said book has a lot of words in bold. \textbf{} doesn't seem to be working with the custom font ...
4
votes
1
answer
182
views
fontspec optical sizes
I am trying to set up variable fonts on LuaLaTeX via the fontspec package. I am trying to get the font size and the optical size (opsz) to have nearly the same value. (I am aware that the opsz ...
2
votes
2
answers
96
views
LuaTeX: How to prevent hyphenation from breaking opentype features?
I try to create my own optimized hyphenation, but it seems that hyphenation rules affect the Opentype-features (especially ligatures defined in a font) when used with LuaTeX and fontspec. Here is a ...
0
votes
0
answers
48
views
What is this font, please? [duplicate]
I found this note on the internet, does anyone know what the font is in it (and how to use it in latex), thanks
3
votes
1
answer
176
views
Change math font to Arial
I'm working on submitting a manuscript-style scholarship essay, and the formatting must be 12pt Arial. Which I was able to get working using LuaLaTeX. However, once I got that working, I quickly ...
0
votes
0
answers
19
views
Old-style numbers including in small-caps acronyms but not in glossary
I want to consistently use old-style numbers and also small-caps for acronyms.
However in the list of acronyms I actually want to make the acronym all upper case and have the number be lining as well. ...
0
votes
1
answer
57
views
How to make a font family with the font file in its own folder
I have uploaded the TTF font file EBGaramond-Regular.ttf to my Overleaf document and am compiling with LuaLaTeX. I would like to move the font file into a folder called Fonts. How can I change these ...
0
votes
0
answers
22
views
Missing space after \addfontfeature
Consider the following example:
\documentclass{article}
\usepackage{fontspec}
\begin{document}
My text\addfontfeature{RawFeature=+onum} and more words.
\end{document}
Compiling it (both with ...
0
votes
0
answers
46
views
Using Consolas for listing in Overleaf
It's known that the default TT font family is too wide. I would try to use Consolas to list my code instead, since a lot of people are familiar with this programmer-oriented font. At the same time, I'...
0
votes
0
answers
72
views
Why does the microtype protrusion feature sometimes lead to warnings and bad boxes?
I've prepared a MWE example to demonstrate the issue. In the MWE, I've loaded the microtype package with the default settings with the fontspec package with the original Charter font. When I compile ...
0
votes
1
answer
39
views
adjusting text around contextual alternate Q with lettrine in XeLaTeX?
I'm trying to see whether there's a way I can use contextual alternate initial Q(u) in lettrine without its tail colliding with other text. Usinga fontspec's \addfontfeature{Style=Alternate} within ...
1
vote
2
answers
60
views
Alegreya SC in LaTeX
Does anyone know how to use the font Alegreya SC in LaTeX?
I am aware of the package Alegreya, but it does not seem to provide the right capitalization. Any ideas?
0
votes
0
answers
13
views
fontspec: No autofakebold when given boldfont
I am writing a latex macro.
I know that \defaultfontfeatures{AutoFakeBold=4} can open fake bold in fontspec
but this will use fake bold if or not BoldFont is given
I want a function like:
if no ...
7
votes
1
answer
209
views
How to detect whether a specific font shape exists
I am using the font Times New Roman as the main font in my document class. The font works fine under Windows, but fails to display small captital font shape under macOS. It turns out that the relative ...
1
vote
1
answer
44
views
Fontspec's WordSpace feature fails to work inside TikZ node with align=center
Consider the following code, in which I am trying to change the WordSpace inside a TikZ node. With align=flush left it works fine; but with align=center, the WordSpace configuration no longer ...
0
votes
0
answers
41
views
Math chracters \prime, active prime ('), *, \circ printing double superscript position in xelatex
I am trying to redefine the math characters from STIX Two Math otf font, i successfully redefine all characters in xelatex through \Umathchardef command.
I am facing the issue for \prime, active prime ...