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 use my Century Gothic TrueType font in a document, but it's failing to use the fl and fi ligatures. The input's below:

\documentclass{article}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Century Gothic}
\begin{document}
ff fi fl
\end{document}

I'm using Win7; running charmap, I can see Century Gothic has the ligatures at 0xFB01 and 0xFB02, so I'd expect XeLaTeX to be able to pick them up. The document compiles with no errors, but no ligatures either.

I'm running MiKTeX, and the package update program tells me I'm on the latest version of everything.

Update: Raphink's suggestion to specify Ligatures=Rare or Ligatures=Historical has no effect on the produced document, and results in the console output having a few repeats of errors similar to the below:

*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
* 
* OpenType feature 'Ligatures=Rare' (+dlig) not available for font 'Century
* Gothic' with script '' and language ''.
*************************************************

Update 2: As suggested by Ulrike Fischer, possibly relevant output from running xelatex --output-driver="xdvipdfmv -vv" with \XeTeXtracingfonts= 1 in the file produced console output including the following lines that look vaguely relevant (it means nothing to me, but I'm hoping it might make sense to some of you):

<AGL:texglyphlist.txt>[1<CenturyGothic(Century Gothic:Regular)@9.96pt<NATIVE-FONTMAP:CenturyGothic/H/65536/0/0>
fontmap: CenturyGothic/H/65536/0/0 -> C:/Windows/Fonts/GOTHIC.TTF(Identity-H)

pdf_font>> Input encoding "Identity-H" requires at least 2 bytes.
pdf_font>> The -m <00> option will be assumed for "C:/Windows/Fonts/GOTHIC.TTF".
(CID:CenturyGothic)
pdf_font>> Type0 font "C:/Windows/Fonts/GOTHIC.TTF" cmap_id=<Identity-H,0> opened at font_id=<CenturyGothic/H/65536/0/0,0>.
>]
otf_cmap>> Creating ToUnicode CMap for "C:/Windows/Fonts/GOTHIC.TTF"...
(CID:C:/Windows/Fonts/GOTHIC.TTF[BNGDWL+CenturyGothic][CIDFontType2][5 glyphs (Max CID: 79)][12097 bytes])

There's also the following from the log file:

.................................................
. fontspec info: "no-scripts"
. 
. Font Century Gothic does not contain any OpenType `Script' information.
.................................................
…
.................................................
. fontspec info: "defining-font"
. 
. Font family 'CenturyGothic(0)' created for font 'Century Gothic' with
. options [Ligatures=TeX].
. 
. This font family consists of the following shapes:
. 
. * 'normal' with NFSS spec.:
. <->"Century Gothic/ICU:mapping=tex-text;"
. 
. * 'bold' with NFSS spec.:
. <->"Century Gothic/B/ICU:mapping=tex-text;"
. 
. * 'italic' with NFSS spec.:
. <->"Century Gothic/I/ICU:mapping=tex-text;"
. 
. * 'bold italic' with NFSS spec.:
. <->"Century Gothic/BI/ICU:mapping=tex-text;"
.................................................

Update 3: Note this is a TrueType font, not an OpenType one. Still, the ligatures exist, so I see no reason why I shouldn't be able to use them…

share|improve this question
    
I don't have Century Gothic here so I can't test. Some OTF fonts have ligatures but do not activate them by default. In that case, you may need to use discretionary, or even sometimes rare ligatures parameters. –  ℝaphink Nov 4 '11 at 11:38
    
@Raphink: I tried that, but the various commands I found via Google for doing so seemed to produce a whole bunch of errors. I suspect this was simply me doing it wrong, but I couldn't work out how to enable them. –  me_and Nov 4 '11 at 11:55
2  
Don't search for command via google. Read the documentation of fontspec instead. Also add to your document \XeTeXtracingfonts= 1 and compile on the command line with xelatex --output-driver="xdvipdfmx -vv" file. Then check the fonts mentioned in the log and the messages of xdvipdfmx. Perhaps this will give you some clues. –  Ulrike Fischer Nov 4 '11 at 12:07
    
@me_and: Try the Ligatures=Rare and Ligatures=Historical options. –  ℝaphink Nov 4 '11 at 12:11
1  
[Mapping=tex-text] is obsolete, Ligatures={TeX}is recommended. Not sure, perhaps, ligatures are disabled intentionally for Century Gothic. –  Igor Kotelnikov Nov 4 '11 at 12:16

3 Answers 3

up vote 8 down vote accepted

I have century gothic on the PC at work. I can't install the font properties extension (http://www.microsoft.com/typography/TrueTypeProperty21.mspx) there so I can't really inspect the font. But if I call the font with \setmainfont[Ligatures=Common]{Century Gothic} fontspec tells in the log:

OpenType feature 'Ligatures=Common' (+liga) not available for font 'Century
* Gothic/I' with script '' and language ''

So I would say the open type ligature feature is not there.

If you really want to use that font you will have to write a custom mapping file and compile it with teckit and then use it with the Mapping-option (like Mapping=tex-text). You can find examples of mapping files in your texmf tree in \fonts\misc\xetex\fontmapping. teckit is here http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=TECkitDownloads

Btw: The output you provided was useful. It told me e.g. the exact name of your font (and its type), it also excluded some other source for font problems.

share|improve this answer

Have you checked whether the version of Century Gothic you have on your system is in OpenType format? The reason I ask is that I believe that most "advanced" font-related features of XeLaTeX require the font to be in OpenType format.

Update:

I've now obtained copies of both the "ordinary" (truetype) font "Century Gothic" -- filename "gothic.ttf" -- and the opentype font "Century Gothic Standard", filename "CenturyGothicStd.otf". I should note that apart from the ligature support detailed below, the two fonts seem to be almost identical; the ttf version features 244 glyphs, the otf version has 251. (Well, besides the "Standard" opentype font, there's also a "Pro" opentype version, but I don't have that font.) They're both sold by Monotype and, in particular, both fonts possess the "f-l" and "f-i" ligature pairs. Furthermore, neither font features the "f-f" ligature pair or the "f-f-l" and "f-f-i" ligature triplets.

With the truetype font loaded with the command \setmainfont{Century Gothic}, I get the following output when running the OP's MWE:

enter image description here

the same as the OP did. In contrast, with the opentype font -- loaded with \setmainfont{Century Gothic Std} -- I get

enter image description here

(In both cases, I've also provided the instruction \addfontfeatures{Ligatures=TeX}.)

Hence, at least for the case of Monotype's releases of the "Century Gothic" font in truetype and opentype formats, it does appear to be the case that the .otf version provides more "services" (at least when accessed from xelatex) than the .ttf version does.

share|improve this answer
    
No, it's a TrueType font, not OpenType. I'd have thought XeLaTeX would be able to see that the ligature code points exist, though, and use them. Is there a way to make it do that? –  me_and Nov 4 '11 at 15:54
    
I'm not aware of such a method. I'm afraid your main option, if you want to stay with this font, is to buy the Opentype version, which I think costs about $30 from fonts.com. –  Mico Nov 4 '11 at 17:08
    
OpenType and TrueType is essentially the same thing (there is a bit of messy nomenclature around font formats), but what matters really is the availability of layout features, see Ulrike's answer. –  Khaled Hosny Nov 4 '11 at 19:07
    
@KhaledHosny: Please see my augmented/updated answer: I find that the .otf version of the "Century Gothic" font can indeed generate the f-ligatures, whereas the (older) .ttf version does not. This makes me think that, contrary to your assertion, OpenType and Truetype are not "essentially the same thing". –  Mico Nov 4 '11 at 20:17
2  
@Mico: (Roughly) there exist "OpenType based on postscript" (extension otf), "OpenType based on TrueType" (extension .ttf) and the original "TrueType" (also extension .ttf). The last is problematic if you want to use "OpenType features". –  Ulrike Fischer Nov 5 '11 at 13:29

Well, I had a similar problem with a different font, and I found I could make it work by using what would in your case be RawFeature={+liga}. I can't test it because I don't have Century Gothic on my system, but I suspect it might work as follows:

\documentclass{article}
\usepackage{xltxtra}
\setmainfont[Ligatures=TeX, RawFeature={+liga,+hlig,+dlig}]{Century Gothic}
\begin{document}
ff fi fl
\end{document}
share|improve this answer

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.