adityam / filter

ConTeXt module to process contents of a start-stop environment through an external program
45 stars 10 forks source link

t-vim in conflict with setupbodyfont #55

Closed champignoom closed 2 years ago

champignoom commented 2 years ago
\usemodule[vim]

\definefontfamily [mainfont] [mono] [Latin Modern Mono]
\setupbodyfont [mainfont]

\setupvimtyping[vimcommand=nvim]
\definevimtyping[code]

\starttext
\startcode
--
\stopcode
\stoptext

Only one dash is shown. By removing \definefontfamily and \setupbodyfont, two dash are shown as expected.

adityam commented 2 years ago

Add features=none in the font setup, otherwise default font features are applied which includes tlig, which converts -- to en-dash.

\usemodule[vim]

\definefontfamily [mainfont] [mono] [Latin Modern Mono][features=none]
\setupbodyfont [mainfont]

\setupvimtyping[vimcommand=nvim]
\definevimtyping[code]

\starttext
\startcode
--
\stopcode
\stoptext