Questions tagged [fontspec]

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

This tag should be used for questions that relate to the fontspec package, which is used for loading OpenType fonts in XeLaTeX and LuaLaTeX.

(Actually, fontspec can be used to load other sorts of fonts, too, but loading OpenType fonts is the main use case.)

2276 questions
29
votes
2 answers

\setmainfont vs \fontspec

The documentation of fontspec package is quite confusing: This section concerns the variety of commands that can be used to select fonts. \fontspec{⟨font name⟩}[⟨font features⟩] \setmainfont{⟨font name⟩}[⟨font features⟩] \setsansfont{⟨font…
Alexey
  • 2,099
23
votes
2 answers

Scope of \addfontfeature

I have encountered something while using fontspec that I do not quite understand. What is the scope of a font feature added using the \addfontfeatures command? For instance, consider the example below using lualatex: \documentclass{article} …
13
votes
1 answer

New version of fontspec gives WordSpace error

The new version of fontspec (February 1, 2016, version 2.5a) gives the following error (MacTeX2015): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ./mathcal2016.tex:17: fontspec error: "not-in-addfontfeatures" ! ! The "WordSpace" font feature…
sgmoye
  • 8,586
12
votes
1 answer

font selection for entire doc

Hello there:) Could someone show me how to select fonts (serif: regular/bold/italic/bolditalic/smallcaps, sans: regular/bold/italic) for entire document using fontspec and font's filenames. And at least one decorative font for special occasions (not…
user38292
  • 121
  • 1
  • 1
  • 3
11
votes
3 answers

Fontspec causes long underscores

My collaborator added \usepackage[no-math]{fontspec} to a document we're working on. The result is that \_ underscores become v. long: cf. pictures below.…
Mohan
  • 15,906
10
votes
3 answers

Fontspec warning about lining numbers not being available in font

Using the sans serif font Linux Biolinum, I set the Numbers option to Lining, in order to use normal numbers. This gives the following warning message (twice): ************************************************* * fontspec warning:…
Sverre
  • 20,729
10
votes
2 answers

Can fontspec provide a fallback font if a font doesn't exist?

I'm working on a document with a collaborator who is particular about their choice of font. My collaborator has provided me with the font files, but on the particular machine I'm using then I don't have administrator access and can't install the…
Andrew Stacey
  • 153,724
  • 43
  • 389
  • 751
8
votes
1 answer

emshape undefined

In the following example the line \renewcommand\emshape works fine on one Linux computer using Kile but has to be commented out on another Linux computer also using Kile. There are not other differences between the files and no known differences…
Richard
  • 81
7
votes
1 answer

Scale font to a desired x-height/em/cap-height/etc' in fontspec

When reproducing a typographic layout from print I often run into the usual difficulty of a font's "point size" not being easily measureable on a page. On the other hand, features such as x-height and cap-height are easy to measure but fontspec…
6
votes
1 answer

What is the best way to write Bangla in latex?

I planning to write a long report (~300 pages) in latex. My report will contain a lot of Bangla text along with English text. I found several ways to write Bangla in latex, but I failed to choose the best way. Another important thing is that when I…
mmr
  • 2,249
  • 5
  • 22
6
votes
1 answer

How to get subs/sups for figures but not letters?

I am playing with a font (found here) that has sups/subs defined for figures but not for letters. If I don't enable them, I don't get them: But if I \usepackage{realscripts} to enable them, I lose the ability to use letters as sub/superscripts at…
dedded
  • 2,236
6
votes
1 answer

Fontspec: Is there any practical difference between \setmainfont and \newfontfamily + \def\rmfamily{...}

As the title of this question suggested. Is there any practical difference between \setmainfont{font name} and \newfontfamily\familyname{font name} \def\rmfamily{\familyname} I had a look into the source of font spec. I believe the above two are…
Yan Zhou
  • 9,032
5
votes
0 answers

Font shapes `TU/zpltlf/m/n' `TU/qhv/m/n' undefined

Compiling this file with xelatex I see the following warnings: LaTeX Font Warning: Font shape `TU/zpltlf/m/n' undefined (Font) using `TU/lmr/m/n' instead on input line 20. LaTeX Font Warning: Font shape `TU/qhv/m/n' undefined (Font) …
5
votes
0 answers

Combining fonts in XeLaTex

I have been able to combine math fonts thus \setmathfont{Asana-Math.otf} \setmathfont[range={"0370-"03FF}]{GFS Baskerville} \setmathfont[ range={"0000-"50,"52-"007F}, % minus () Numbers=Lowercase] % and use Q from main {Adobe…
Toothrot
  • 3,346
5
votes
0 answers

Side bearings of Minion Pro quotes

I'm using Minion Pro with XeLaTeX. However, quotes are much too tight. I know the MinionPro package, for use with LaTeX, has a loosequotes option which slightly increases the side bearings of the ‘quote’ character. Does anyone know whether it's…
Bernard
  • 461
1
2 3 4 5 6