% !TEX TS-program = lualatex
\documentclass{article}

% Test program: Apply the 'selnolig' package, with
% 'english' language option set, to a list of English
% words which contain various character pairs that
% should not be ligated. The list of English words is 
% in the companion file 'selnolig-english-wordlist.tex'.
%
% Author: Mico Loretan (loretan dot mico at gmail dot com)
% Date: 2013/05/25

% Check first that we're running Lua(La)TeX.
\usepackage{ifluatex}
\ifluatex\else
  \typeout{===============================================}
  \typeout{The file selnolig-english-test.tex must be     }
  \typeout{compile using lualatex. Exiting immediately.   }
  \typeout{===============================================}
  \endinput
\fi

\usepackage[margin=1in]{geometry}

\righthyphenmin=2 % set this to either 3 (normal) or 2

\usepackage{fancyvrb}

\usepackage{fontspec}

\defaultfontfeatures{%
     Ligatures={TeX,Common,Rare},
     Numbers  = OldStyle}

\setmainfont[ FeatureFile= gpp-ft.fea,
              ItalicFont = {Garamond Premier Pro Italic},
              BoldFont   = {Garamond Premier Pro}]
    {Garamond Premier Pro}

\setmonofont[Scale=MatchLowercase,
             Ligatures=NoCommon]
            {Consolas}

\newfontfamily\ebg[ 
    Ligatures = {TeX,Common,Rare,Historic},
    ItalicFont = {EB Garamond 12 Italic}]
    {EB Garamond 12 Regular}

\usepackage[document]{ragged2e}
\usepackage[english,hdlig,broadf]{selnolig}

\usepackage{showhyphens}

\setlength\parindent{0pt}
\parskip=0.3\baselineskip
\usepackage{multicol}
  \setlength\columnseprule{.4pt}
\title{selnolig-english-test}
\author{\null}
\date{}

\begin{document}
\maketitle

\begin{tabular}{@{}*{10}{l}}
Appearance of f-ligatures 
   &ff &fi &fl &ffi &ffl &ft & \mbox{fj} & {\ebg\mbox{fk}} 
   & \emph{fr}\\
Sample words with these ligatures
   &off &fit &fly &office &baffle &often & fjord 
   &{\ebg Kafka} &\emph{from}\\
\end{tabular}

\bigskip

\begin{tabular}{@{}*{13}{l}}
Appearance of other ligatures 
 & st & ct & sp  
 & \emph{as} & \emph{is, th, us}
 & \emph{at} & \emph{et} & {\ebg\emph{sk}}& \emph{ll}\\
Sample words with these ligatures
 & stay & act & spy 
 & \emph{was} & \emph{\mbox{is}thmus} & \emph{cat} & \emph{net} 
 & {\ebg\emph{ask}} & \emph{ill}\\
\end{tabular}


\bigskip

\makeatletter
\begin{tabular}{@{}ll}
Options and other parameters:\\
Value of \texttt{\textbackslash righthyphenmin} parameter & \the\righthyphenmin\\
Extent of suppressing f-ligatures: basic or broadf?  & \if@broadfset broadf \else basic \fi \\

\end{tabular}
\makeatother

\bigskip

\begin{multicols}{2}
\input selnolig-english-wordlist
\end{multicols}
\end{document}
