For pedagogical purposes, I would like to highlight some characters in a word, through bold or red color or whatever will work.
Because I use handwriting fonts (German Schulschriften wedn and French Cursive frcursive), I am bound to ligatures working well. Unfortunately, ligatures are blocked if you switch series or color in the middle of a word.
I would be happy with a XeLaTeX or LuaLaTeX solution. If needed, also with a PDFLaTeX solution. And as said, any kind of highlighting would be fine.
Here the MWE:
\documentclass[varwidth]{standalone}
\usepackage[ngerman,frenchb]{babel}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\setmonofont[Scale=.75]{Linux Libertine Mono O}
\setsansfont[Scale=MatchLowercase]{Linux Biolinum O}
\usepackage{wedn}
\newcommand{\schschrift}{\selectlanguage{ngerman} \wedn\upshape}
\usepackage{frcursive}
\usepackage{xcolor}
\begin{document}
\newcommand{\fex}[3]{#1\textbf{#2}#3}
% \renewcommand{\fex}[3]{#1{\bfseries #2}#3}
{
\schschrift
\fex{W}{ö}{rter} -- Wörter
}
{
\cursive
\fex{incr}{oy}{able} -- incroyable
}
\renewcommand{\fex}[3]{#1\textcolor{red}{#2}#3}
{
\schschrift
\fex{W}{ö}{rter} -- Wörter
}
{
\cursive
\fex{incr}{oy}{able} -- incroyable
}
\renewcommand{\fex}[3]{#1#2#3}
{
\schschrift
\fex{W}{ö}{rter} -- Wörter
}
{
\cursive
\fex{incr}{oy}{able} -- incroyable
}
\end{document}
You can see that, in the first 2 lines, W and ö don't bind well, as well as the r and o + y and a, when put in bold or in red. Compare to the non-highlighted versions.




frcursivehas very long ligatures indeed. And LuaLaTeX is not very happy with this font. – benjamin Mar 12 '19 at 09:33