Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fontspec]

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

4
votes
1answer
32 views

Weird Vertical Spacing of '*' with Fira Code in Listings

I am recently getting started with LuaLaTeX and I was trying to set up a custom listings style for C++. Consider the following MWE: \documentclass{scrartcl} \usepackage{fontspec} \usepackage{xcolor} ...
0
votes
0answers
25 views

How best to use STIX2 in a document?

I would like to typeset a document that has both mathematics and English text using the STIX/STIX2 fonts. However I am confused by the various options. First, I assume that STIX2 should be used in ...
3
votes
1answer
29 views

Why does setmonofont change the justifying of normal text using the same font?

I usually use a different font for URLs e.g. email adresses. Today, I tried to change it in a letter to use the same font als the normal text and it cancelled the justification in the main body of the ...
3
votes
1answer
24 views

How can my master.tex file find font files stored in a subfolder to my working directory?

I need to use the font Gotham Rounded, and have so far placed the eights font files (.otf) in my working folder, i.e. the folder containing my master.tex file. This works fine. When compiling my ...
0
votes
0answers
34 views

Package error Fontspec [duplicate]

I try to compile a Latex template and get this error even though I compile using XeLateX. Using Texmaker. I get this exact error when compiling many different templates. Error code: Package: ...
1
vote
1answer
24 views

Different font for numbers in URLs [duplicate]

I am using mathspec to make the fonts in math mode match the roman fonts used in my text body. The “digits” environment in mathspec takes effect for all digits in the document. This means that digits ...
2
votes
1answer
34 views

The macros setmainfont and setsansfont do not accept the new command of a newfontfamily. Is there compatibility between them?

I use the class memoir, the packages polyglossia, fontspec, compile in XeLaTeX in Linux and on macOS. Based on XeTeX package fontspec: Use previously defined \newfontfamily with \setmainfont (there ...
1
vote
1answer
206 views

xepersian 21.9 cannot load the font “Psychedelia HM”. Is this a bug?

After upgrading my texlive, xepersian 21.9 can not load the font which is loaded without any problem by the older version 21.7. My code is: \documentclass{article} \usepackage{xepersian} \...
1
vote
0answers
19 views

Changing and declaring fonts for parts of the document without changing the default

This might be a silly question, but I am very confused of how to declare fonts for only one sentence/paragraph. The solution I found was to use {\fontfamily{ppl}\selectfont ... } However, I am not ...
4
votes
2answers
72 views

XeLaTeX Font Warning: Font shape `TS1/Arial(0)/m/n' undefined, how to fix it?

I hope a quick and easy solution is possible Error Code LaTeX Font Warning: Font shape TS1/Arial(0)/m/n' undefined (Font) usingTS1/cmr/m/n' instead on input line 75. Main Problem The error ...
1
vote
1answer
24 views

Adding random font directories to use with fontspec in macOS

Is there a way to use fonts installed in random directories in fontspec without providing the path in each use case? e.g. I want to use the fonts installed in ~/Library/Fonts. So far I have only ...
0
votes
0answers
33 views

Why do I get a question mark on Xelatex when I try to type accent marks/diacritics?

I am typing \documentclass[12]{article} \usepackage{fontspec} \begin{document} pā \end{document} and I get and output of p? in the PDF without any errors or problems in the console.
1
vote
1answer
71 views

Why is LuaLaTeX not picking up small caps glyphs?

I have a font, whose font table is as shown in the image. However, when I compile a basic document with LuaLaTeX, the text appears as lower case, though small caps is specified. I understand, from ...
0
votes
0answers
38 views

Using fontspec (which requires exp3-code.tex) makes lualatex slow

I recently tried luatex (TeX Live on Mac) and found that if I use fontspec to load a font, it really slows down the compilation. My test document: \documentclass{article} % \usepackage{fontspec} % \...
0
votes
1answer
39 views

fontspec interfering with list of figures

This script \documentclass{article} %\usepackage{fontspec} %requires XeLatex ...
0
votes
1answer
31 views

Looking for Fira Sans by file name using the metropolis beamer theme (e.g. for Overleaf)

I'm using the metropolis beamer theme. In beamerfontthememetropolis.sty, the fonts are loaded by font name, e.g.: \setsansfont[ItalicFont={Fira Sans Light Italic},% BoldFont={Fira ...
0
votes
0answers
37 views

LaTeX fonts with math and utf8 support [duplicate]

Although I like Computer Modern font families I'd like to be able to make documents look like they were made by "normal person" and still be able to benefit from the TeX powers*. In short the solution ...
0
votes
0answers
33 views

Seeking Example of XeLateX with Glossaries (package)

I've been unable to successfully compile a glossary in XeLaTeX. Here's the material: %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass{article} \usepackage{fontspec,xltxtra,...
1
vote
1answer
49 views

Changing the Font in Moderncv

I'm using the moderncv template and I cannot change the font. I'm looking at https://www.overleaf.com/articles/slash-fontspec-all-the-fonts/qnsxyhrgjsgs for my fonts. Using \setmainfont does not ...
2
votes
1answer
46 views

Advanced Math Mode Customization in XeLaTeX

Observation If you have used MathType in Word, you know well that we can customize the font of the equations -- not only change the overall font, but also change the font of brackets, numbers, ...
6
votes
1answer
46 views

can fontspec work with CMYK colors?

Can fontspec be used to manage a document's fonts if the fonts need to use the CMYK color model? The fontspec documentation, section 6.1, says that fontspec uses RGB colors. My experimentation (MWE ...
0
votes
0answers
35 views

How to make “fakebold” work on custom font?

I am including a special font for greek, but when I use it, the \textbf{} command does not result in bold letters. I have added a [FakeBold=3], but it has no effect. What's the problem? \...
1
vote
1answer
32 views

Changing font of a beamer presentation (Szeged-dove)

I'd like to change the font of everything (but really everything) that appears in my beamer Szeged-dove presentation from default to some font I have the .ttf of (if that's relevant, I'm working on ...
2
votes
0answers
44 views

\textit generates different shape from primary italic font

It's said that \textit will select an italic font, instead of doing some geographical change to the font. This means it will generate exactly the same thing as using italic font directly. However, I ...
0
votes
1answer
52 views

Change Boldness of Certain Fonts

For some certain fonts, they have different level of "boldness". For example, Avenir Next has Ultra Light Light, Regular, Medium, Demi-Bold, Bold and Condensed Bold... Below is an example done by ...
1
vote
2answers
29 views

Option clash xeCJK and fontspec

I need to load the fontspec package with the no-math option while also loading the xeCJK package to include a few Japanese names in a large English document. Since thexeCJK package already loads the ...
2
votes
1answer
76 views

fontspec: Defining a new font family using TeX Gyre Pagella causes error [closed]

I just updated my packages through the MikTeX console, and when I try to define a new font family with TeX Gyre Pagella, I get a mysterious error (below). Just defining the new font family leads to ...
1
vote
1answer
33 views

How do I select a Chinese font for caption label?

I am writing a document in Chinese and would like to choose a font for the caption label, different from that is used in the main text. I know it is tricky to work with Chinese font in LaTeX, but I ...
2
votes
1answer
80 views

Adobe Fonts (formerly Typekit), LuaLaTeX, and Optical Sizes

I’ve been having trouble using fonts that make use of Optical Sizes from Adobe Fonts (formerly Typekit) in LuaLaTeX. 1 · Adobe Fonts As Adobe Fonts uses a clever injection mechanism to inject its ...
4
votes
0answers
60 views

Source Han: Em dashes (U+2014) fail to compose as U+2E3A and U+2E3B

Background A 破折号 (pòzhéhào, Chinese em dash) is a punctuation mark used in Chinese typesetting. It has very similar usage to the Western em dash. The Chinese em dash has two ...
0
votes
1answer
85 views

migrating from Linux to Mac

For the longest time, I have written LaTeX documents on Unix or Linux. Due to several reasons, I'm actively planning to move this to Mac. I installed Mactex, Linux Libertine fonts, RomDev.tec and ...
0
votes
1answer
39 views

How to use mtpro2 together with other math-font?

for example, load mtpro2 and XITS-Math for different paragraph But it seems, mtpro2 und unicode-math can not be loaded together Error like: LaTeX error: "kernel/command-already-defined" ! ! ...
2
votes
1answer
101 views

\setmainfont works with XeTeX but not with LuaTeX

I'm trying to use LuaTeX with Adobe's Garamond Premier Pro, but it doesn't work, saying that: ! error: (type 0): cannot find file '' ! ==> Fatal error occurred, no output PDF file produced! ...
4
votes
1answer
55 views

How can I scale mono font to 90% of MatchLowercase

I would like to scale the mono font so that it's x-height is 90% of the x-height of the main font. (I think it looks too large when the x-height matches.) Is this possible? Sample code with ...
2
votes
1answer
192 views

Getting fontspec Fonts with pdfLaTeX

I have to make a document, which was originally written in LuaLaTeX, compatible for both pdfLaTeX and LuaLaTeX. Everything works except that the fonts differ. How can I force pdfLaTeX/fontenc to use ...
8
votes
3answers
426 views

Why does the baseline skip depend on the letters depth in some fonts?

I have some trouble with the line high using an OTF with fontspec package. The baseline skip of a line differs depending on the depth of the used letter. So for example a line containing a »g« is ...
2
votes
1answer
56 views

\ohm does'n show while using user font

I want to use Source Serif Pro as mainfont and XITS Math as mathfont. But \setmainfont{Source Serif Pro} makes \SI{100}{\ohm} not working. if remove \setmainfont{Source Serif Pro}, it looks ...
0
votes
0answers
59 views

Specifying relative paths with fontspec

My goal is to specify a relative path when loading fonts with fontspec, so that I can provide custom fonts within my package. Otherwise, the user will be forced to install the font manually, which is ...
1
vote
3answers
103 views

font families side by side

for sure nothing that not has been answered already but i can't find it. How to get roman and sansserif fonts in one document? I need the LATEX Roman while my document is sans serif. \documentclass[...
0
votes
1answer
49 views

Fontspec does not find font using a common style file

In mydir/subdir, I have \usepackage{../../latex/lecture/mylecture} invoking the below mylecture.sty: \usepackage{fontspec} \usefonttheme{professionalfonts} % using non standard fonts for beamer \...
5
votes
0answers
151 views

Localized glyphs (locl) have unicode value U+FFFD (�)

Originally this seemed to me like a font issue, as there was no equivalent problem with other fonts, as indicated by this good MWE: Copied text from good PDF EBGaramond12-Italic.otf: [ - ] бгдпт [...
2
votes
2answers
66 views

Positioning of text in tikzfadingfrompicture

I'm trying to create an effect in LaTeX Beamer where an image is cut out in the shape of a letter. I want the letter to be placed in the top left corner of the frame, and in the background, so text ...
0
votes
1answer
95 views

Loading Custom Fonts into RMarkdown

I've been testing loading my own fonts into a personal rmarkdown document using the fontspec latex package. Because I'll eventually need to knit this on a server, using the font library on my mac is ...
2
votes
0answers
48 views

Accented characters in a hyperlink, and problems with opening a new window

With this MWE, I have different results depending on the pdfviewer on linux box : Evince dosen't find the link because of the é, but opens a new window on a non-accented link Okular finds the link ...
1
vote
2answers
51 views

Mismatch in small-caps/caps in appendix sections numbering

The MWE below creates a section numbering in the appendices of the form A.1, A.2 with A in small caps, but 1,2,3 in full caps. How can I either make A full caps or the number small caps? \...
0
votes
2answers
45 views

Configuring LaTeX to use fonts installed through portableapp.com

portableapp.com is a windows app that provides (besides a suite a portable apps) a workaround for installing fonts on a windows machine, without admin access. The work around is described in detail ...
1
vote
1answer
55 views

Bold font size is not changed for \setmainfont

I wanted to typeset a document with Times New Roman 18pt size (using xelatex). MWE: \documentclass{article} \usepackage[a4paper]{geometry} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \...
2
votes
1answer
27 views

Misalignement and interword spacing with mono font

I'm making a document with XeLaTeX and I would like to use a mono TTF font (Liberation Mono) and a special (reversed) indentation for my paragraphs. I don't understand some things about words spacing ...
1
vote
1answer
69 views

Babel before or after fontspec?

Paying keen attention to package loading order, I wonder if babel should be loaded before or after fontspec. Neither manual carries information on the loading order. Furthermore, there are ...
2
votes
2answers
237 views

fontenc vs fontspec with XeLaTeX

I have encountered something I fail to understand. I have read that I should use fontspec and not fontenc when I use XeLaTeX, but this causes some problems for me when I use the cochineal font package....