{fontspec} is a package for loading {opentype} fonts in XeLaTeX and LuaLaTeX.
33
votes
1answer
505 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 ...
26
votes
2answers
1k 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 ...
25
votes
1answer
502 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 ...
22
votes
1answer
274 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
7answers
5k 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. ...
20
votes
1answer
247 views
Bad interaction between fontspec and some lua code that performs string-related search and replace operations
I'm in the process of readying a LuaLaTeX package for "official" release to the CTAN, but I need to squash a few remaining bugs first. The bug described in this question concerns incorrect behavior of ...
19
votes
2answers
625 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
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; ...
18
votes
3answers
3k 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, ...
18
votes
1answer
2k 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
...
15
votes
1answer
712 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 ...
15
votes
1answer
834 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 ...
14
votes
4answers
757 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
...
14
votes
2answers
1k 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)
...
14
votes
2answers
613 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}
...
14
votes
2answers
329 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
186 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
1answer
584 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 ...
13
votes
1answer
1k views
XeTeX 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}
...
13
votes
0answers
363 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 + ...
12
votes
3answers
265 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 ...
12
votes
3answers
106 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
3answers
3k 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 ...
12
votes
2answers
1k 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 ...
12
votes
1answer
209 views
Why use \DeclareTextFontCommand vs. just \newcommand?
Why should I use \DeclareTextFontCommand vs. just \newcommand?
In the answer to my previous question, @egreg said:
With \DeclareTextFontCommand you get a robust command that will remain
...
12
votes
1answer
433 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). ...
12
votes
1answer
638 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" ...
12
votes
1answer
247 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 -- ...
11
votes
3answers
139 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 ...
11
votes
2answers
1k 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}
...
11
votes
4answers
245 views
How to prevent combining a character?
"EB Garamond" font combines ʿ character and the preceding letter.
Consider following document:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\begin{document}
aʿ bʿ cʿ dʿ ...
11
votes
1answer
560 views
xelatex stopped working after TexLive2011 update 2 days ago
I updated Tex Live 2011 a couple of days ago and I can't run XeLaTeX anymore on a document I was working on. When it runs it gets stuck and I have to abort it. Resulting in the following error. I've ...
11
votes
1answer
627 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 ...
11
votes
4answers
776 views
How to print \frac{1}{2} by a single Unicode character?
I am looking for a command which would print simple fractions like 1/2, 1/3 etc using glyphs available in modern TTF/OTF fonts. Ideally, I want this command to output ordinary \frac{1}{2}, \frac{1}{3} ...
11
votes
1answer
182 views
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 ...
11
votes
1answer
190 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}
...
11
votes
1answer
473 views
Getting started with Greek and Hebrew in LuaLaTeX
I am typesetting a 17th century English theological document that uses a smattering of Greek and Hebrew. I am using LuaLaTeX with TeXShop on the Mac.
Is LuaLaTeX up to the task? If so what are the ...
11
votes
3answers
2k views
Using MinionPro for the main font and Fontspec for the monospaced font
I am using Minion Pro for my document's main font and would like to use Consolas for my code listings.
I know that I can set the monospace font using fontspec and setmonofont, but it seems I cannot ...
11
votes
1answer
585 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
...
11
votes
2answers
1k 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 ...
10
votes
2answers
1k 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}
...
10
votes
3answers
2k 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}
...
10
votes
4answers
969 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 ...
10
votes
2answers
405 views
Substitute italic ampersand with alternative ampersand in Linux Libertine O
Based in this answer I want to create a command \amper that uses the alternative ampersand of Linux Libertine O and leaves the regular \& alone. The problem with the MWE below is that hyperref ...
10
votes
2answers
552 views
Replacing Unicode non-breakable spaces by normal spaces
I am using the Neo keyboard layout, which uses all kinds of modifier keys to input all kinds of characters (e.g. Greek letters and mathematical symbols). It also has shift+Mod3+space mapped to Unicode ...
10
votes
2answers
587 views
Kerning issue with Adobe Garamond Pro: XeTeX or font file to blame ?
I have run into a strange kerning issue, limited to the German letter pair Wä, when using the Adobe Garamond Pro font with XeTeX. The document looks great except for that particular pair. But see for ...
10
votes
3answers
3k 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?
10
votes
1answer
309 views
text figures (old style numbers) and mhchem
How do I achieve lining figures with mhchem while maintaining text figures in the text (lualatex).
My MWE is:
\documentclass{minimal}
\RequirePackage[paperwidth=70mm, paperheight=20mm, left=10pt, ...
10
votes
1answer
374 views
Reduce compilation time for opentype fonts (otf)
I have some opentype fonts (otf) which I use with fontspec. Everything works fine.
During the compilation LuaLaTeX load the otf-files in a temporary file.
For example:
(load: ...
10
votes
1answer
544 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
...
