12

I am using a lot of special characters such as ā, ī, ū, š, ṣ, ḥ, ḫ and so on. I just spotted that sometimes this causes problems with ligatures for example the fi-ligature, if the dot on the i is a dash: fī.

In my MWE below I am using the Brill font: http://www.brill.com/author-gateway/brill-fonts .

I've come so far to have learned that there are three options to set :

If you want to get an MWE, please download it from here: http://www.arabic-philosophy.com/misc/minimal_fi.tex (Copy&Paste into this forum did not work because it made Option 1 and 3 be identical in sight.)

This is the result: http://www.arabic-philosophy.com/misc/minimal_fi.pdf

Option 1 is the one that emerges when I type a f and an ī.

Option 2 has been suggested by tohecz.

Option 3 is the one I'd prefer.

Is there a way to enable myself just to type as I used to but to tell LuaLatex to use option 3 instead of 1 as the output? What in fact is the difference between 1 and 3?

Speravir
  • 19,491
  • Are you sure there is an fī ligature to begin with? What about showing a MWE? – egreg Sep 10 '12 at 10:21
  • no, you're right. there is in fact none but I thought maybe it just makes a normal fi-ligature and then adds a dash. Anyway, as you see above, sometimes there is unnecessary space between f and ī and sometimes it is not. – ClintEastwood Sep 23 '12 at 12:19

2 Answers2

11

In my humble opinion, fi shouldn't be ligatured when i has some other top-accent than a dot. You can do that by putting the empty braces {} between the letters: f{}ī. This image shows some variants, the last one is fi overlapped with \=\i, for comparison (I show the code as well, utf8 char ī doesn't work for me hence the \= command):

enter image description here

yo'
  • 51,322
  • interesting. When I use f{}ī, then what I have called "error" occurs. (See the picture I just added to my question). Maybe this then is an error of the Brill font? – ClintEastwood Mar 18 '12 at 18:40
  • The empty braces {} supresses both ligatures and kerning of pairs, i.e. the characters will have their boxes just next to each other. That's why the ī letter might get moved right. But still, there should be correct placement of . after ī. – yo' Mar 18 '12 at 18:49
  • is there a way to "force" ligatures or to do the exact opposite than {} so that the boxes are not simply put next to each other? – ClintEastwood Apr 12 '12 at 06:42
8

Your option 3 is using

U+0069 (LATIN SMALL LETTER I) U+0304 (COMBINING MACRON)

instead of

U+012B (LATIN SMALL LETTER I WITH MACRON)

You get the former when inputting the latter by using

\usepackage{newunicodechar}
\newunicodechar{ī}{ī} % use "i + combining macron" in the second argument

or, without too much hassle in inputting strange characters,

\newunicodechar{ī}{i\char\string"0304 }

This is the output from your test file (omitting option 2).

enter image description here

Minimal example:

\documentclass[12pt, a4paper]{scrbook}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Brill}

\usepackage{newunicodechar}
\newunicodechar{ī}{i\char\string"0304 }

\begin{document}

\begin{verbatim}
1a. Kitāb an-Naǧāt fī l-ḥikma.

1b. \emph{Kitāb an-Naǧāt fī l-ḥikma}.

3a. Kitāb an-Naǧāt fī l-ḥikma.

3b. \emph{Kitāb an-Naǧāt fī l-ḥikma}.
\end{verbatim}

1a. Kitāb an-Naǧāt fī l-ḥikma.

1b. \emph{Kitāb an-Naǧāt fī l-ḥikma}.

3a. Kitāb an-Naǧāt fī l-ḥikma.

3b. \emph{Kitāb an-Naǧāt fī l-ḥikma}.

\end{document}
egreg
  • 1,121,712