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

learn more… | top users | synonyms

39
votes
2answers
4k views

microtype settings for dummies

More than a year ago, a friend of mine was totally excited about microtype features in LaTeX. He was talking about it quite a bit and then said to me: "Show me your document, let me input some lines ...
37
votes
1answer
889 views

How to suppress a “Rare” ligature that pre-empts a “Common” ligature for the same character pair?

In several documents I'm creating with LuaLaTeX (using MacTeX2012 on a Mac that's running MacOS X 10.7.5), I primarily use the Adobe-issued font Garamond Premier Pro as the main text font. I use this ...
28
votes
1answer
4k views

Load fonts that are in a ./fonts directory

I'm new to TeX. I have the following problem: How can I load a font from a file in a directory, which is located in the root of the project? Say I have something like: /project /fonts ...
28
votes
1answer
760 views

In lualatex, hyphenation doesn't seem to work for words that contain certain ligatures

It would seem that hyphenation does not work properly under LuaLaTeX if the hyphenation points occur at places where TeX inserts ligatures. Consider the following MWE, which (i) provides hyphenation ...
26
votes
8answers
9k views

How to get straight quotation marks?

How do I get straight quotation marks, i.e., " and ' in TeX? (No, \verb changes the font and this is unacceptable.) [Edit] I forgot to mention that I’m using XeLaTeX, and fontspec is a necessity. ...
25
votes
2answers
2k views

An example of changing kerning of a font in LuaLaTeX

LuaLaTeX, through the luaotfload package, is able to dynamically add and modify features and properties of a font. This is performed by using the FeatureFile option in fontspec when loading a font; ...
24
votes
1answer
417 views

Bad interaction between fontspec and some lua code that performs string-related search and replace operations

Update 2013/05/28: The selnolig package is now on the CTAN. Comments and critiques always welcome! If you wish to contact me about any aspects of the package, please use the email address that's given ...
22
votes
1answer
2k views

Lualatex (luaotfload) broke after upgrading to Mavericks

Ever since I upgraded to OS X Mavericks—post hoc ergo propter hoc—I can no longer compile my dissertation using LuaLaTeX. When running lualatex I first got the following error: luaotfload | db: ...
22
votes
1answer
504 views

How to automatically adjust the emdash length according to current language?

In Russian typography the emdash, which is typed as the ligature --- in LaTeX, is 20% shorter than the standard emdash. The babel package cares this difference so that --- prints a shorter emdash if ...
20
votes
3answers
924 views

Which Unicode fonts are available with grades/optical sizes comparable to Donald Knuth's awesome eight grades in Computer Modern Roman?

Which Unicode fonts are available with grades/optical sizes comparable to Donald Knuth's awesome eight grades in Computer Modern Roman? It would be great to get at least 3 options! This question is ...
20
votes
3answers
6k views

How to scale Tikz drawings and text together?

I'm trying to build a diagram (a logo, actually) that I can scale easily through a parameter. I'd like to be able to scale both drawing and fonts through a single parameter. Here's my current MWE, ...
20
votes
4answers
552 views

It doesn't hyphenate words ending with “—”

UPDATE Well. After a while, I decided to see again about this “problem”, and just discovered that in pdfLaTeX, using \usepackage[utf8]{inputenc} and the — (the unicode —, not the ligature ---) it ...
19
votes
2answers
2k views

Lualatex: Font table with examples

I wanted to create a table of the fonts on my machine with short examples of each. So I got the function below and tried to modify to print the font in its typeface. (LuaLatex) ...
19
votes
2answers
947 views

How to get Wikipedia W from Linux Libertine?

How can I get the Wikipedia-looking crossing-w from Linux Libertine font? They talk about it on their homepage and in the wikipedia article, but I can't find an example of how to actually produce it. ...
19
votes
2answers
1k views

fontspec, lua, microtype: Renderer=Basic no longer working for specific font styles

You may have noticed that, as of now,* letterspacing small capitals is not as easy as it was in pdfTeX, where we could simply combine \textsc with microtype's \textls. Consider this example, which ...
18
votes
3answers
1k views

Does LaTeX automatically change fonts when switching between Title, Author, Date, and Body Text or sizes modifiers?

I have a question regarding the inner workings of the system. Let us assume that I am using the article class. I cannot help but notice that the title seems to have a different look than the body ...
18
votes
0answers
706 views

Letterspacing/font expansion in LuaLaTeX

I am a few months into learning LaTeX. I would like to use microtype with LuaLaTeX and I would like to obtain letter spacing for my smallcaps. I've tried to follow some of the threads on the subject ...
17
votes
5answers
5k views

Hand written fonts in LaTeX/XeTeX/LuaTeX

Recently my struggle to find out some handwritten fonts for some document led me to this question. What are the various packages that give nice looking handwritten and / or calligraphic fonts? I ...
17
votes
1answer
865 views

TeX accents do not seem to work with fontspec and xe/lua/latex

I am using Minion Pro as mainfont and it does not have in its glyph table the character U+1E47 Latin small letter with dot below which I need only once in my document. Rather than change to another ...
17
votes
1answer
2k views

fontspec with Helvetica breaks quotes

The usual quoting with `` and '' doesn't work anymore after including this (which also changes the engine to XeTeX): \usepackage{fontspec} \setmainfont{Helvetica} They are just printed verbatim in ...
17
votes
1answer
3k views

XeLaTeX warning: Redefining document command \oldstylenums with arg. spec. 'm'

I updated my MiKTeX to the newest version a few days ago, and after this when I compile documents with the fontspec package included, there's a warning. For example: \documentclass{article} ...
17
votes
2answers
435 views

Is there a way to use different local font files for different font size in fontspec?

I am a big lover of the EB-Garamond fonts by Georg Duffner. As of now, he has made two sets of font files, EB-Garamond-8 and EB-Garamond-12, respectively for “design size 8pt” and “design size 12pt”. ...
16
votes
5answers
892 views

How can I access a specific glyph in LuaLaTeX/Fontspec?

The OTF version of Minion Pro contains several Dingbats glyphs I would like to access. Some of them are not unicode, so I can not just copy the specific unicode character I want to access into my text ...
16
votes
3answers
4k views

How to enable ligatures for emdash/endash in LuaTeX ?

I cannot switch on ligatures for emdash (---) and endash (--) in LuaLaTeX. Here is my test file: % !Mode:: "TeX:UTF-8" \documentclass{article} \usepackage{fontspec} ...
16
votes
2answers
908 views

Parentheses differ (XeLaTeX, fontspec, newtxmath, libertine)

After Internal error: bad native font flag I stumbled upon another weird problem with the combination XeLaTeX/fontspec/Libertine/newtxmath: \documentclass{scrartcl} \usepackage[no-math]{fontspec} ...
16
votes
1answer
701 views

LuaLaTeX protrusion problem with Negative value

Please see the following screen shots. As you can see there are two "overfull" hbox there. However, LaTeX does not produced any overfull box warning at all. I tried to produce a minimal working ...
15
votes
4answers
1k views

Bembo, Bembo Book or Garamond Premier Pro? And how to exploit all their features with LuaLaTex?

I am allowed to use one of these fonts (or the three of them if I want) to edit a document. Here is the list of the Bembo fonts I have : Bembo-Bold.otf Bembo-ExtraBoldOsF.otf ...
15
votes
1answer
2k views

How to choose a specific weight from a font family using fontspec and XeLaTeX

I have installed an open-type font on my OS and would like to use in a LaTeX document using XeLaTeX. It works fine, but when I define my font family like this: \ifxetex ...
15
votes
1answer
148 views

fontspec ruins Lilypond's note spacing

I use lilypond-book to include music examples in my TeX document, but it seems that fontspec breaks the horizontal spacing between the notes: without fontspec with fontspec This MWE shows the ...
15
votes
1answer
571 views

LuaLaTeX + fontspec: cannot compare documents with Acrobat

I use the option "compare documents" in Adobe Acrobat Pro a lot to highlight changes between revisions. What I just noticed is, if I compile a simple document such as the one below with LuaLaTeX + ...
14
votes
3answers
4k views

Fontspec: Palatino with small caps and old-style figures

For various reasons, I’m using the fontspec package. However, I’d also like to use Palatino as the document’s main font, and I want to use it with small caps and old-style figures. So I’ve got four ...
14
votes
4answers
2k views

Fake small caps with XeTeX/fontspec?

Using XeTeX and fontspec, I use the Liberation font family in of my documents. Unfortunately those fonts (esp. Liberation Serif) do not natively support small caps. Is there a way to enable fake ...
14
votes
3answers
375 views

Best practice - how can I get my whole document (including math) to only use font X with LuaLaTeX and fontspec?

Considering one uses math symbols in a document, it is desirable to have them all displayed in the serif font one is using for text, or in basically any font x one would like to use for this sort of ...
14
votes
1answer
3k views

What math fonts are available that work in xelatex?

For LaTeX, we have the Font Catalogue which is a good resource for fonts available through LaTeX. There doesn't appear to be a similar resource for Xe(La)TeX. So let's say I'm bored of computer ...
14
votes
1answer
1k views

Using TIPA with fontspec

I'm trying to write a document that will contain characters in many different scripts (for which I am using fontspec and rendering with xelatex) and IPA symbols (for which I am using TIPA). ...
14
votes
1answer
385 views

Towards a \ucshape and \textuc command for uppercase text (XeTeX, LuaTeX)

While we have \textit and \textsc, \itshape and \scshape etc., there's no \textuc and \ucshape to typeset its argument in uppercase. There is \MakeUppercase, but -- as uppercase is not a font style -- ...
14
votes
2answers
548 views

Bar plots in sans serif font

I want to typeset my bar plots with a sans serif font (using LuaTeX). I tried many options that I found searching the manual and the internet. None of them solved my problem---using different fonts ...
14
votes
1answer
234 views

Prevent LuaLaTeX from splitting umlauts

Here's a minimal example: \documentclass{minimal} \usepackage{fontspec}\setmainfont{Cambria} \begin{document}aöz\end{document} Compiling this into a PDF using lualatex and extracting the text using ...
13
votes
3answers
511 views

Possible to use MnSymbol with LuaTex?

I want to use the Minion Pro font together with math symbols from MnSymbol (http://www.ctan.org/tex-archive/fonts/mnsymbol). Is this possible? It has already been discussed here -> ...
13
votes
1answer
1k views

How to flip / produce the mirror image of a special character in xelatex

I'm producing a menu with xelatex using the font Bickham Script Pro. It has a swirly pattern I'd like to use at the beginning and end of a line. The swirly character would need to be flipped to have ...
13
votes
3answers
4k views

How to properly install and use a new font with LuaLaTeX?

I have problems trying to get new fonts to work when compiling with LuaLaTeX. I'm working on Mac and use TexShop (with the MacTeX package). It goes like this: I downloaded for example the Cardo ...
13
votes
1answer
1k views

using Hoefler Text font under lualatex and MacOSX

I'm having unexpected problems getting the "Hoefler Text" font to work when using LuaLaTeX (under MacTeX2012, all the latest updates installed) on a Mac (MacOS X 10.7.4). The following MWE ...
13
votes
1answer
869 views

How does fontspec select fonts “by name”?

When loading a font by name, what is the search mechanism being used? How is the matching done? (It's marked TODO in the documentation) I have many problems, for example: a "Hoefler Text Engraved" ...
13
votes
2answers
2k views

How should one setup fontspec package to exploit best features of Pro fonts ?

Suppose that you have a Pro class fonts such as Adobe Arno which has several design sizes as described below: Design Size Size Ranges Caption: 8 point 5–8.5 point SmText: 10 ...
12
votes
2answers
2k views

How do I change the font size in LuaLaTeX?

\documentclass{minimal} \usepackage[paperheight = 140mm,% comprimento paperwidth = 200mm,% altura margin = 10mm % tamanho da margem ]{geometry} ...
12
votes
3answers
159 views

Executing a command after a package has been loaded

In my previous question I ended up with \DeclareMathSymbol{:}{\mathpunct}{operators}{"3A} But now I'm using the fontspec package which redefines : with \AtBeginDocument itself. So as my own ...
12
votes
2answers
2k views

Selecting main math font in LuaTeX?

I’d to set some fairly simple maths in Minion Pro (and potentially other system fonts), using LuaTeX.  I’d hoped that something like the following should work: \documentclass{minimal} ...
12
votes
3answers
294 views

telling luaotfload where to look for fonts

The documentation of luaotfload states that on Linux fontconfig is used to find the font locations. However all fonts I install in /usr/share/local/fonts edit: /usr/local/share/fonts(as I don't want ...
12
votes
3answers
6k views

Switching back to Computer Modern within XeLaTeX

Until I select a font using \fontspec{ ... }, XeLaTeX uses the default of Computer Modern. Once I select some font, I have no idea how to re-select Computer Modern. Can anyone help?
12
votes
1answer
306 views

fontspec: what does Renderer=Basic do?

I'm writing a document using LuaLaTeX on Windows, using Arial (please do not comment on that) as its main font with: \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} ...