# `-` disappears when changing font in ConTeXt

This is my code:

``````\starttext
\starttyping
-- comment
\stoptyping
\stoptext
``````

It compiles fine:

However, if I change the font:

``````\usemodule[simplefonts][size=12pt]
\setmonofont[Source Code Pro]

\starttext
\starttyping
-- comment
\stoptyping
\stoptext
``````

One of the dashes disappears:

Why is that happening?

• It might be a problem with ligatures. – Manuel Oct 11 '16 at 10:10
• @Manuel thought about that, but I tested using the font in my editor and it did not replace the two `--` with a ligature (my editor renders ligatures). – flyx Oct 11 '16 at 10:12

If you load a monospaced font without any further information it will automatically enable the TeX ligatures (`tlig`) which includes `--` and `---`. To prevent this, load the font with `features=none`.

Furthermore, the `simplefonts` module has been superseded by the `\definefontfamily` method which I show below. To match the sizes of all fonts we apply some scaling.

``````\definefontfamily [source] [rm] [Source Serif Pro]     [scale=0.9]
\definefontfamily [source] [ss] [Source Sans Pro]
\definefontfamily [source] [tt] [Source Code Pro]      [features=none]
\definefontfamily [source] [mm] [TeX Gyre DejaVu Math] [scale=0.9]

\setupbodyfont[source,12pt]

\starttext
\starttyping
-- comment
\stoptyping
\stoptext
``````

• * Furthermore, the simplefonts module has been superseded by the \definefontfamily* sadly not in the distribution I use :/ – flyx Oct 11 '16 at 18:38
• @flyx Which distribution do you use? I use TL 2016. – Henri Menke Oct 11 '16 at 18:49
• Something on an old CentOS which is maintained by someone else, I cannot tell you exactly (this is the common infrastructure where everything has to compile). – flyx Oct 11 '16 at 19:10

Okay, I was not aware that there are TeX ligatures in addition to the ligatures the font may provide itself. This fixes it:

``````\setmonofont[Source Code Pro][features=none]
``````