# Chartwell fonts and changing colour with ligatures

Bit of a niche question. There is a beautiful set of TrueType fonts called Chartwell designed for producing graphs from text. I am trying to get these to work in Latex. I have switched to Xe(La)tex, and can now get the fonts to appear. However I would like to change text colour without sequence of numbers being split into two. Best explained with some code and a picture.

\documentclass[13pt]{article}
\usepackage{fontspec}
\usepackage{xcolor}

% Now define your quick commands for switching fonts
\setmainfont{ChartwellRose}
\newfontfamily\cwrose[Ligatures=Rare, Color=blue]{ChartwellRose}

\begin{document}
\raggedright

Here is the text without ligatures

\fontsize{48}{60}
\selectfont
40+20+50
\rmfamily
\normalsize

Here is the text with ligatures

\cwrose
\fontsize{48}{60}
\selectfont
40+70
\rmfamily
\normalsize

Here is the text with a colour change inserted

\cwrose
\fontsize{48}{60}
\selectfont
\rmfamily
\normalsize

And as you can see the colour change has broken the effect of enabling the ligatures and the 'rose' is now presented as two separate objects (rather than a single object with 2 different colours.

\end{document}


Is it possible therefore to change the colour of a part of the text without the ligature formation being broken?

Here is a screenshot of the compiled example and here is a screenshot of unbroken form of the last example

-
 Not in XeTeX, color will always break text flow and hence the ligatures, and \addfontfeature just defines a new font from the current one plus the requested features. Possible with LuaTeX though, if you are interested in LuaTeX solutions. – Khaled Hosny Feb 18 at 22:21 Thanks for the advice. At least I know to stop looking. I'll leave the question open just a little longer in case someone else has an alternative suggestion. – drstevok Feb 19 at 8:17 So I have just discovered the sparklines package. Should have worked out that many of the things that Chartwell does can already be done in latex. Will use these instead of chartwell! – drstevok Feb 20 at 15:49