In XeLaTeX (or LuaLaTeX), if you are using an opentype/truetype font, you can just load it with the default ligature features (usually just liga
) turned off.
In standard LaTeX, the only safe solution that I know is to create special tfm files that do not contain ligatures. The new primitive, '\noligs
' in pdftex 1.30 was created specifically so that you do not have to mess with these tfm files. The modification to the tfm files is not that hard, but I do not know how to make latex make use of the results.
To patch a tfm file, say 'cmr10.tfm', first find the file and go to its location, then do this:
$ tftopl cmr10.tfm > cmr10-noligs.pl
The output file cmr10-noligs.pl
is a 'human readable' representation of the tfm contents. You can open it in any text editor. Close to the top, there is a table that starts like this:
(LIGTABLE
(LABEL O 40)
(KRN C l R -0.277779)
(KRN C L R -0.319446)
(STOP)
(LABEL C f)
(LIG C i O 14)
(LIG C f O 13)
(LIG C l O 15)
within the LIGTABLE
, delete all lines with LIG
in it (most fonts have only LIG
, but there are some variations possible like /LIG
and LIG/>
). When you have done that, you
may end up with combinations of LABEL
and STOP
on consecutive lines. Whenever that happens, delete both those lines also.
Then save the file, and run the shell command
$ pltotf cmr10-noligs.pl
This creates the new metrics file, cmr10-noligs.tfm
, that can then be used to do typesetting without any automatic ligatures.
Before you can actually use this font, you (usually) also have to add a dvips/pdftex map file entry for it, otherwise these programs will believe you have created a completely
new metafont font. In this case, my pdftex.map
contains this line for cmr10
:
cmr10 CMR10 <cmr10.pfb
all that is needed is a copy of that line with the new tfm name
cmr10-noligs CMR10 <cmr10.pfb
Note: it is actually possible that there is no matching map line for the original font
because it was itself a virtual font. In that case, you do not need an extra map line at all, but you do need to copy the <fontname>.vf
file (use kpsewhich
to find it, it is on your disk somewhere) to <fontname>-noligs.vf
.
Someone else will have to explain how to create a LaTeX package from new tfm files,
I do not remember how to do that any more.
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.
Best Answer
The gothic font by Yiannis Haralambous is meant to reproduce old German typography, which sported several ligatures. The problem of choosing between a long and a short s is quite difficult to solve automatically, because it's not simply context depending, but knowledge of word fragments is necessary when compound words are involved.
So the method for choosing between the two variants is manual: type
s
for a “long s” ands:
for a short one.If you need to avoid a ligature, add
\/
between the letters (this will hinder hyphenation, though).Depending on the situation,
\kern0pt
might be better than\/
(which adds the italic correction). For theygoth
font the problem is irrelevant, because only the en-dash and em-dash have a nonzero italic correction.Just for information. The font defines ligatures for the pairs or triples
(short s)(long s) (short s)t (short s)(short s) (short s)(short s)i
ae
be ba bo
ch ck ct
da de do
ha he ho ij
ff fi fl ffi ffl
ll
pa pe po pp
qq qz
(long s)(long s) (long s)t (long s)z
oe
tz
va ve vu
The other ligatures are
s:
for the short s"a
"e
"o
"u
for the vowels with umlaut"s
for the es-zetHere's the test document: