Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to get the hang of xelatex and fontspec and I'm a little confused about how character variants are selected. I'm using the font Bickham Script Pro.

Confusion (1) Some words are typesetting contain lowercase letters with fancy bits at the beginning or end of the letter which disturb the flow of the text. It makes the word look like it has a gap in it and looks ugly to the eye. The same letter in other words does not suffer as it is a different variant. Is there a way to control this?

Confusion (2) There are different versions of capital letters which seem to be used at random. This adds some welcome variety to the text but again I would like to know if there is a way to control this.

I spent the evening looking at the fontspec manual and the adobe character guide for the font trying to figure this out. Can someone help please?

share|improve this question
    
A minimal working example might be welcome to understand how you use fontspec to load your font. Also, I'd be willing to try it out myself if you're willing to send me an Adobe fonts license (just kidding :-)) –  ℝaphink Aug 12 '11 at 12:36
add comment

1 Answer 1

up vote 5 down vote accepted

Are you sure the alternatives are used randomly?

The homepage suggests that "substitutions are made dynamically as the context changes", so contextual variants seem to be a feature of this font.

To turn on or off such features, you'll have to refer to the list of features of the font you're using. You can list these features by using otfinfo on the file:

$ otfinfo -f fontfile.otf

Or by using a program such as fontmatrix to display the font and try out the OTF features until you find the one you need.

Once you know the feature, you can activate/deactivate them using fontspec. For example:

$ otfinfo -f /usr/local/share/fonts/EBGaramond.otf 
c2sc    Small Capitals From Capitals
calt    Contextual Alternates
case    Case-Sensitive Forms
ccmp    Glyph Composition/Decomposition
cv01    <unknown feature>
cv02    <unknown feature>
cv03    <unknown feature>
dlig    Discretionary Ligatures
dnom    Denominators
frac    Fractions
kern    Kerning
liga    Standard Ligatures
lnum    Lining Figures
mark    Mark Positioning
mkmk    Mark to Mark Positioning
numr    Numerators
onum    Oldstyle Figures
ordn    Ordinals
pnum    Proportional Figures
sinf    Scientific Inferiors
smcp    Small Capitals
ss01    Stylistic Set 1
ss02    Stylistic Set 2
ss05    Stylistic Set 5
subs    Subscript
sups    Superscript
tnum    Tabular Figures

shows the features supported by EB Garamond. I can then select some of these features, such as:

\setmainfont[RawFeature={+ss02,+cv01,+ss05,+dlig},ItalicFeatures={RawFeature=+cv04}]{EB Garamond}

Contextual alternates could be turned off by using -calt for example.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.