Questions tagged [fontspec]

{fontspec} is a package for loading {opentype} fonts in XeLaTeX and LuaLaTeX.

Filter by
Sorted by
Tagged with
4 votes
2 answers
109 views

xelatex: set mono font after loading unicode-math and modify \parfillskip leads to big whitespace in texttt

Consider the following example: \documentclass{article} \usepackage{fontspec} \usepackage{unicode-math} \setmonofont{NewCMMono10-Regular} % any other typewriter font would do \begin{document} \...
Jinwen's user avatar
  • 8,316
1 vote
2 answers
52 views

Fonspec desn't allow me to change the footnote font size

The title says it all. I'm using preamble.tex in R bookdown, and i changed the mainfont using fonspec like this: \usepackage{fontspec} \setmainfont{Calibri Light}[SizeFeatures={Size=14}] Now ...
Jimmy's user avatar
  • 11
0 votes
0 answers
133 views

Bug in fontspec 2.9a or luaotfload (which one?) while use LuaLaTeX

LuaLaTeX does not find the CMU font. Package fontspec Error: The font "CMUSansSerif" cannot be found. \setmainfont At the same time, XeLaTeX compiles normally. I am using TeXLive2023 (Win ...
sergiokapone's user avatar
  • 5,454
0 votes
2 answers
46 views

fontspec breaks capital greek letters redefinition

I am unable to redefine uppercase math symbols when using the fontspec package. Here is a minimal working example: \documentclass[ngerman]{standalone} \usepackage{fontspec} \let\psi\alpha %...
Richard's user avatar
3 votes
3 answers
74 views

Get path to font file, AtBeginDocument

Using lualatex, TeXlive 2023. I am on Linux, but this question must apply to any platform, not just Linux. OpenType fonts, not necessarily provided by TeXlive. Pseudo-code: \documentclass{article} % ...
rallg's user avatar
  • 1,937
1 vote
1 answer
29 views

Iconsolata Bold Italics FakeSlant Not Working (Xe/LuaLaTeX)

This is a follow-up question of this answer, which provides a FakeSlant-based method for providing bold italics for Iconsolata using XeLaTeX or LuaLaTeX (with fontspec). The original method works, but ...
Teddy van Jerry's user avatar
3 votes
2 answers
287 views

Want to darken a font just a little

I see where my description may have been misleading, so here is a revised question. I want to make "dog" just a little darkder than the normal text. I do not want it to be anywhere near as ...
dedded's user avatar
  • 2,174
1 vote
1 answer
62 views

Setting mainfont and sansfont unsets CMU Bright as math font; how to fix?

I would like to be able to use a custom TTF (News Gothic) as the main font throughout my document wherever text occurs, and CMU Bright for math. But \text inside math mode should use New Gothic. ...
BallpointBen's user avatar
1 vote
2 answers
102 views

Create a new font from FakeBold

The fontspec package proposes a nice FakeBold=1.5 to create a fake bold with various weight. It works nicely, except that I feel like anti-aliasing is not working as nicely in Okular (my understanding ...
tobiasBora's user avatar
  • 8,401
3 votes
1 answer
139 views

Equivalent of font-weight?

What is the lualatex (via fontspec) equivalent of the css font-weight: 541; that allows us to choose continuously a font weight (bold/semi bold…) in a continuous fashion, when a font uses the "...
tobiasBora's user avatar
  • 8,401
3 votes
2 answers
620 views

(Overleaf/LuaLaTeX/Times New Roman) Why does ы have the acute accent being in the wrong position, as opposed to Google Docs, that places it right?

When Using Times New Roman in both LuaLaTeX and Google Docs, the acute accent in each isin a different position, with Google Docs having the right one. Why does LuaLaTeX have the wrong position? I ...
Felix Maldonado's user avatar
0 votes
0 answers
56 views

LaTeX Font Warning: Font shape ... long time issue ... never resolved

The warning I've had in my LuaTex code for too long (and far toooo many failed searches), that I'd like to eliminate, involves the following: LaTeX Font Warning: Font shape `T1/phv/sb/n' undefined (...
RosesBouquet's user avatar
1 vote
0 answers
88 views

XeLaTeX + fontspec + StylisticSet changes underlying Unicode characters in the text

I have recently played a bit with OpenType features in some fonts for Insular variants of certain characters – and when I make a document containing characters like s, t, g and set the appropriate ...
silmeth's user avatar
  • 323
3 votes
1 answer
85 views

Custom math mode font

I created a custom font Computer Modern Roman Blackboard Bold, similar to the Computer Modern Roman - italic as the following image: As you can imagine, I want to implement this font in math-mode ...
Agente 156's user avatar
4 votes
1 answer
101 views

Getting error "Font shape undefined" - explain solution?

When compiling my document I get the error. Font shape `TS1/TeXGyreTermes(0)/m/n' undefined (Font) using `TS1/cmr/m/n' instead. It's not stopping my document from being compiled correctly but it's ...
reneas's user avatar
  • 77
2 votes
1 answer
79 views

expl3 renew msg?

Using lualatex, Linux, TeXlive 2023. When fontspec cannot find a requested font, it issues a message, defined as follows (using expl3): \__fontspec_msg_new:nnn {font-not-found} { The font "#1&...
rallg's user avatar
  • 1,937
0 votes
0 answers
57 views

Find the right font

What must be done to find the right font with these commands? \setmainfont[Mapping=tex-text]{Ubuntu} \setsansfont[Mapping=tex-text]{Ubuntu Medium} \setmonofont[Mapping=tex-text]{Ubuntu Mono} \...
Socrates's user avatar
  • 423
1 vote
1 answer
56 views

Fontspec on Overleaf has trouble with .fontspec files

I am trying to use a non-standard font (Figtree) on Overleaf while keeping the main directory as clean as possible. The directory looks like this: font/ Figtree-Bold.otf Figtree-BoldItalic.otf ...
Isaac Ren's user avatar
  • 143
2 votes
0 answers
34 views

Mapping greek-mathematical to slanted text greek

I am using a font, namely Source Code Pro, that does not have mathematical Greek letters (eg. U+1D6FC) but does have upright Greek ordinary letters (eg. U+03B1), which I can slant with fontspec's ...
ysalmon's user avatar
  • 1,148
3 votes
1 answer
70 views

Minus sign in siunitx inverse unit does not adapt to font size

It appears to me that the minus sign in ms^{-1} from siunitx does not adapt to the font size. Here are two examples, one at 10pt and one at 12pt: I believe the first minus sign is too long. Is it too ...
Anna's user avatar
  • 763
0 votes
1 answer
67 views

Cannot select custom typewriter font with fontspec package

I have downloaded FantasqueSansMono-Normal.zip font from here. I extracted the TTF fonder with the fonts: ➜ naulatex git:(logical-markup) ✗ tree TTF TTF ├── FantasqueSansMono-Bold.ttf ├── ...
Vladyslav Rehan's user avatar
1 vote
0 answers
24 views

Why are my bullet points for moderncv, fontspec, fontawesome not working correctly? [duplicate]

On overleaf, my CV looks fine, but when I use TexShop, the name is misaligned and the bullet points have [regular] next to them. \documentclass[11pt,a4paper,roman]{moderncv} \moderncvstyle{...
Xerium's user avatar
  • 11
0 votes
0 answers
96 views

How to set Tahoma as a main font in Latex?

I have searched alot about this. But non of them help me to resolve my issue. I am trying to set the "Tahoma" as a main font for my latex thesis template but it gives an error(Package ...
Samia Rani's user avatar
2 votes
1 answer
80 views

How to use CMU Bright as math font?

I was using cmbright for my thesis, but it had some problems with characters like "é", "ã" and "ł". So I changed the main font to Roboto Light, but I still want to use ...
k130874's user avatar
  • 23
2 votes
0 answers
59 views

Fontspec mapping tex-text AND devanagarinumerals

I am unable to figure out the correct way to tell fontspec to adhere to both Mapping=tex-text and Mapping=devanagarinumerals. Here's an MWE: % !TeX program = XeLateX \documentclass{article} \...
Karthik Raman's user avatar
2 votes
1 answer
106 views

Get current font

How could I get the current font, notably when it is set with \setmainfont{Times New Roman}? I tried \l_fontspec_font, \f@family and \l_fontspec_family_tl but none of them contains exactly the name of ...
tobiasBora's user avatar
  • 8,401
2 votes
1 answer
60 views

newtx package interferes with ctex (fontspec option clash)

The latest version of newtx interferes with ctex, here's an MWE: \documentclass{ctexart} \usepackage{newtxtext} \begin{document} Hello, 你好. \end{document} I have upgraded to the latest version of ...
NemoYuan2008's user avatar
5 votes
2 answers
81 views

Font for the minus sign created by $-6$ (hyphen in math mode)

I want to specify the font (in the example below: Times New Roman) for all minus signs, regardless of whether they were created with the Unicode character "2212 or with a hyphen in math mode. If ...
Simon's user avatar
  • 63
0 votes
0 answers
74 views

Font Latin Modern Roman cannot be found

I am hosting my Overleaf, and I ran into a wall. I'm trying to compile my BSc thesis template, but I'm constantly getting error that Latin Modern Roman is missing. Latin Modern Roman is a part of TeX ...
Jurrer's user avatar
  • 1
0 votes
0 answers
64 views

FakeBold in fontspec lualatex, method used?

If I were a modestly decent programmer, I would look into the code for this. But not being such... Without knowing the algorithms, I am confident that fontspec FakeStretch and FakeSlant are unlikely ...
rallg's user avatar
  • 1,937
4 votes
1 answer
144 views

OldStyle numbers in text (everywhere)

I have the following code: \documentclass{article} \usepackage{fontspec} \setmainfont{lmroman10-regular} \begin{document} \addfontfeatures{Numbers={OldStyle}} 0123456789\footnote{0123456789} \end{...
Niranjan's user avatar
  • 3,363
0 votes
0 answers
28 views

How can I produce semibold within a textsanskrit command? [duplicate]

I'm creating complex documents with LuaLateX, and there is a problem specifying font weights. It appears to be a clash between fontspec and polyglossia. When the language is defined with polyglossia ...
sujato's user avatar
  • 367
2 votes
2 answers
218 views

\usepackage{newtxtext, newtxmath} does not work

A noob is again in need. I was told to use \usepackage{newtxtext, newtxmath} instead of \setmainfont{Times New Roman} (I assume I will still have the font in Times New Roman. Also, use \usepackage[T1]{...
DGuys's user avatar
  • 57
1 vote
0 answers
39 views

Quotation marks not rendered by XeLaTeX in spite of [Ligatures=TeX] [duplicate]

I have a problem with XeLaTeX that I have not had before. Quote marks are not rendering as "smart". Here is a MWE: \documentclass{article} \begin{document} ``Are quote marks working?'' \end{...
Kazark's user avatar
  • 769
2 votes
1 answer
130 views

Why is the STIX2 bold math font not being used here?

\documentclass{article} \usepackage[no-math]{fontspec} \setmainfont{Noto Serif} \usepackage{unicode-math} \setmathfont{STIX Two Math} \usepackage{amsmath} \begin{document} $\mathbf{v}$ \end{document} ...
chandra's user avatar
  • 3,084
0 votes
0 answers
28 views

Utopia font results in "Invalid font" mesage [duplicate]

I have a document which I previously have typeset without problems. After an upgrade my Linux computer, I cannot use the Utopia font any longer. This simple document no longer works: \documentclass{...
oz1cz's user avatar
  • 1,546
8 votes
3 answers
644 views

Writing μ (mu) in the text mode using Latin Modern Roman font

Is there a way to write the literal μ character using the Latin Modern Roman font or another font with the same font aesthetics/characteristics? The following gets me this error {C:/Users/Diaa/...
Diaa's user avatar
  • 9,529
2 votes
0 answers
76 views

Using an entire font family as fallback font

I currently have Adobe Garamond Pro as my main font. I would like to use Linux Libertine as a fallback font for missing glyphs. \usepackage{fontspec} \directlua{luaotfload.add_fallback ("...
Einreinfall's user avatar
1 vote
0 answers
97 views

Variable Font TTF and Fontspec [closed]

I'm having trouble getting correct font weights (optical or otherwise) with Fraunces from Google Fonts (https://fonts.google.com/specimen/Fraunces) and LuaTeX. It's a variable font! The output is a ...
shaananc's user avatar
1 vote
0 answers
85 views

How do I set the TeXLive system font path for fontspec on macOS?

MacTeX / TeXlive 2021 on macOS 10.15.7 I'm trying without luck to use Times New Roman via the fontspec package. I've read that: fc-list : family | sort will produce a list of system fonts that I ...
Robert L's user avatar
3 votes
1 answer
150 views

TL 2023 fontspec fatal error

I am running a current and fully updated version of TexLive 2023. All of a sudden, none of my files would compile. I have tracked this down to an issue with fontspec. A minimal working (well: failing, ...
Ingmar's user avatar
  • 6,680
2 votes
1 answer
179 views

LuaLaTeX adds spaces between glyphs of a font, while XeLaTeX does not

Using the IM Fell Type Fonts I ran into a problem with my document: With these fonts, the generated pdf will have additional, superfluous spaces between glyphs when compiled with LuaLaTeX. (I also ...
Wraith of Seth's user avatar
0 votes
0 answers
38 views

Changing font in fontspec breaks lua filters

I’m using luaquotes [which I developed] to add smart quotes to text. This works fine, up until I change the font. The package adds lua filters which replace quotation punctuation. For a reason I can’...
ezgranet's user avatar
  • 564
2 votes
1 answer
156 views

How can I use Noto Sans mono CJK iN LuaTex-Ja? (NEWBIE)

2 Weeks ago, I asked how to replace the current default Japanese font for LaTex with Noto Sans mono CJK (How can I change the Japanese font to be used). This font is installed on my Fedora PC using ...
Ben Engbers's user avatar
2 votes
1 answer
39 views

Spurious space in Hebrew polyglossia+fontspec [closed]

I use a tabular environment with paragraph cells. In one of the cells I include a Hebrew paragraph. The result is that I get a spurious space at the end of the first line (and therefore on the left, ...
yannis's user avatar
  • 1,991
1 vote
1 answer
102 views

Best practice, fontspec OpenType feature changes

This question concerns the "best practice" for fontspec with changing OpenType features. I use only lualatex, although I suppose that this also pertains to xelatex. I mean in terms of ...
rallg's user avatar
  • 1,937
0 votes
1 answer
45 views

Use DocStrip (.dtx) with Unicode input

When I compile this file (test.dtx) with tex test.dtx && latexmk -pdflua test.tex, it doesn't support the UTF8 input. %<*driver> \input docstrip.tex \keepsilent \askforoverwritefalse \...
steve's user avatar
  • 2,134
5 votes
1 answer
135 views

From old to new Inconsolata font: shapely L missing

Recently I started playing with the Inconsolata font in LuaLaTeX. At first I was using the font provided by package inconsolata: \documentclass{article} \usepackage{fontspec} \setmonofont[StylisticSet=...
Miyase's user avatar
  • 2,524
4 votes
1 answer
83 views

Why does EB Garamond fail when Greek is the default language in Polyglossia?

I am trying to typeset some text in ancient Greek. (Whether it is ancient or modern doesn’t seem to make a difference.) I would like to do it using EB Garamond, which has polytonic Greek characters. ...
AthanasiusOfAlex's user avatar
1 vote
0 answers
29 views

`fontspec` repeatedly (and cumulatively) turns on font feature

I use an OpenType font which has the tnum feature and I want to make a tabular using nice monospaced numbers, in this way: \def\tabnumbers{\addfontfeatures{Numbers=Monospaced}} \begin{tabular}{l>{\...
Circonflexe's user avatar

1
2 3 4 5
46