Ligatures for fi, fl, ffl do not work for Times New Roman (XeLaTeX)

Prepare a new map file, I called it rijke.map

; TECkit mapping for TeX input conventions <-> Unicode characters

LHSName "TeX-text"
RHSName "UNICODE"

pass(Unicode)

; ligatures from Knuth's original CMR fonts
U+002D U+002D           <>  U+2013  ; -- -> en dash
U+002D U+002D U+002D    <>  U+2014  ; --- -> em dash

U+0027          <>  U+2019  ; ' -> right single quote
U+0027 U+0027   <>  U+201D  ; '' -> right double quote
U+0022           >  U+201D  ; " -> right double quote

U+0060          <>  U+2018  ; ` -> left single quote
U+0060 U+0060   <>  U+201C  ; `` -> left double quote

U+0021 U+0060   <>  U+00A1  ; !` -> inverted exclam
U+003F U+0060   <>  U+00BF  ; ?` -> inverted question

; additions supported in T1 encoding
U+002C U+002C   <>  U+201E  ; ,, -> DOUBLE LOW-9 QUOTATION MARK
U+003C U+003C   <>  U+00AB  ; << -> LEFT POINTING GUILLEMET
U+003E U+003E   <>  U+00BB  ; >> -> RIGHT POINTING GUILLEMET

; additions for f ligatures
;U+0066 U+0066 U+0069 <> U+FB03 ; LATIN SMALL LIGATURE FFI
;U+0066 U+0066 U+006C <> U+FB04 ; LATIN SMALL LIGATURE FFL
;U+0066 U+0066        <> U+FB00 ; LATIN SMALL LIGATURE FF
U+0066 U+0069        <> U+FB01 ; LATIN SMALL LIGATURE FI
U+0066 U+006C        <> U+FB02 ; LATIN SMALL LIGATURE FL

The basis is the standard tex-text.map file found in TeX Live. The “ff” ligatures are commented out, because my copy of Times New Roman doesn't support them.

Now compile it

teckit_compile rijke.map

This will produce a rijke.tec file; if you keep it along your document, the input

\documentclass{article}

\usepackage{fontspec}

\setmainfont[Mapping=rijke,Scale=1.05]{Times New Roman}

\begin{document}

Ligatures: ff ffi ffl fi fl 

\end{document}

will produce

enter image description here


In Windows 10 1803, it seems Times New Roman has been updated to version 7.00, and some (more) ligatures have been added (but into dlig lookup, rather than the more widely-used liga). We can then use fontspec to turn on this feature:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\begin{document}
\verb|Default:                  |
fi fj fl ff ffi ffj ffl Th

\verb|Ligatures=Discretionary:  |
{\fontspec{Times New Roman}[Ligatures=Discretionary] % or `Ligatures=Rare`
fi fj fl ff ffi ffj ffl Th}
\end{document}

image