How to make all i's and j's dotless, glyph substitution

Using XeTeX it's quite easy to substitute all text i and j with ı and ȷ. You can use the powerful Teckit mapping engine.

Create the following file (make sure it's UTF-8). This is the default tex-text map file with a dotless conversion added.

LHSName "dotted"
RHSName "dotless"
; replace dotted i and j with dotless versions
"i" > "ı"
"j" > "ȷ"
; 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

Compile this to a .tec file with the following command:

teckit_compile -u -o dotless.tec

Now you can load any font which has the dotless glyphs with this mapping file and all the is and js will be dotless. If you load the mathspec package you can also substitute the math i and j too.

% !TEX TS-program = XeLaTeX

\setmainfont[Mapping=dotless]{Linux Libertine O}
\newfontfamily\dottedfont{Linux Libertine O}
\setmathfont(Latin)[Mapping=dotless]{Linux Libertine O}
This is a document in which all the `i' and `j'  characters are dotless. 

This is not a joke or a jibe, so jump in and join the high jinks!

{\dottedfont But if this gives you the jitters you can junk the dotless version.}

You can even do it with math:

i = j


output of code

In LuaTeX you can define your own font feature for that matter. If you want the substitution to only apply in text or math mode, just comment out the corresponding statements in the definition below. I also defined the reverse mapping, so you can recover the dotted versions in dotless mode.

fonts.handlers.otf.addfeature {
    name = "dotlessij",
    type = "substitution",
    data = {
        -- Text mode
        i = "ı",
        j = "ȷ",
        ı = "i",
        ȷ = "j",
        -- Math mode
         = "",
         = "",
         = "",
         = "",
\setmainfont{Latin Modern Roman}[RawFeature={+dotlessij}]
\setmathfont{Latin Modern Math}[RawFeature={+dotlessij}]
i, j, \i, \j

$i, j, \i, \j$

enter image description here