[XeTeX] Zero Width Non Joiner, or how not to make a ligature

John Was john.was at ntlworld.com
Thu Nov 15 15:22:14 CET 2007

Hmm.  I think all these problems make my quick suggestion perhaps a bit more 
of a robust solution after all, at least until some more dedicated solution 
is evolved (possibly not in our lifetime).  If you put at the start of your 
file something like

\global\def\ff{\discretionary{f-}{f}{f\strut f}}

that should allow any version of TeX (or I presume LaTeX, which I don't use) 
to break the word correctly if that is a good place to hyphenate and also to 
give separate letters where ff falls in the middle of a line and you don't 
want the ligature to be printed.  The same thing would work with long s and 
all the other complications of German Fraktur ligatures.

The disadvantage, of course, is that your file would then have a lot of 
codes such as {\ff} and so on for all the similar cases - perhaps not a big 
problem for those of us used to traditional plain TeX, but I realize it is 
against the general spirit of XeTeX.  Still, if it gives you the output you 
desire it may be worth adopting even as a temporary solution.  I don't 
*think* there would be a problem with e.g. Auflage and Aufl., where you 
would want Au{\fl}age (on the analogy of my {\ff}) for the full word but 
just Aufl. for the abbreviation (since the fl ligature *is* used in the 
abbreviation):  I presume all flavours of TeX would prohibit a discretionary 
hyphen after the f in Aufl.

At any rate, the zero width non joiner seems too much of an exotic element 
at present to rely on it.


----- Original Message ----- 
From: "Gerrit Sangel" <z0idberg at gmx.de>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Thursday, November 15, 2007 1:59 PM
Subject: JunkEmail: Re: [XeTeX] Zero Width Non Joiner, or how not to make a 

> Am Donnerstag 15 November 2007 schrieb François Charette:
>> > I tried it in Fontforge in the metric window, and of Computer Modern,
>> > Gentium and Linux Libertine, only Computer Modern works as espected.
>> Not sure I understand what you mean...
> Take a look at the attached pictures :)
>> You're right.
>> By the way, if you don't like inputing invisible glyphs in your editor,
>> you could use a font mapping (like tex-text.map) specifically for
>> Fraktur with this line in it:
> Hm, but I think the way with ZWNJ is the best for storing, because one 
> would
> then be more or less independent from XeTeX.
> Also, maybe some time in the future a text editor will come up which can 
> deal
> with Opentype fonts and features and could show the ligatures on the fly.
> Then, if I insert a ZWNJ between two characterds, he could automatically
> breaks the ligatures and show the distinct glyphs. The user could then see 
> if
> a ZWNJ is inserted or not and it would not be so invisible after all.
> But I think that would be a bit optimistic... But I’m using Kate/Kile, 
> maybe
> they have improved Unicode support in QT4 and it is a step toward full
> Unicode/Opentype support on the fly. That would be great.
>> But of course, you first need to find a Fraktur font which supports
>> ZWNJ, which does not seem obvious!
> I wrote a mail to a person who digitalized some Fraktur fonts, but she 
> didn’t
> really know about Unicode and Opentype, she mapped ſ to s and \ was s and 
> the
> individual ligatures were mapped to % or ] or something like that... The
> problem is, almost all Fraktur fonts handle the ligatures that way, the 
> best
> is if someone maps ſ to U+017F, but apart from that, I don’t see a
> really “good” Fraktur font which supports all Unicode and Opentype 
> features.
> Maybe some really expensive ones, but the free or relatively cheap ones 
> don’t
> have these features.
> But that would be the best way. I guess one can then also make websites in
> Fraktur... I found the Script code “Latf” on this page:
> http://www.unicode.org/iso15924/iso15924-en.html
> I guess if the designer would design a website with
> <p xml:lang="de-Latf">Das iſt Fraktur</p>
> the user could really have a convenient page with Fraktur fonts. But this
> would require that
> a) The browser knew about the “Latf” code and the user could specify a 
> font
> for this code
> b) The browser would support Opentype
> c) The designer would use ſ and ZWNJ and not some weird mappings.
> d) A technically up to date Fraktur font would be available (at best free 
> of
> charge)
> I guess this would take years...
>> An alternative would be to make a character (such as |) active in your
>> Fraktur environment, and define it as a \strut : this will also prevent
>> the ligature.
> Hm, I guess this would be a bit too inconvenient. If I did it that way, I
> could also use the frakturx package for normal Latex. But the advantage of
> XeTeX would be that one could really have the ſ inserted.
> But the problem then is that babel does not understand the long s and 
> could
> not wrap the words correctly... This problem does not occur with frakturx.
> Gerrit
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex

More information about the XeTeX mailing list