Closed Goshik92 closed 5 years ago
This is most likely due to a font misconfiguration. Can you post a minimal example showing the bug.
You seem to be right about font issues. In the following code if I comment out \definefontfamily [mainface] [tt] [Consolas]
, I see normal dashes. Is it an issue with Consolas
font?
test.tex:
% Choose US paper format
\setuppapersize[letter]
\definefontfamily [mainface] [rm] [Cambria]
\definefontfamily [mainface] [ss] [Calibri]
\definefontfamily [mainface] [tt] [Consolas]
\definefontfamily [mainface] [mm] [Asana Math]
\setupbodyfont[mainface]
\usemodule[vim]
\definevimtyping[C][
syntax=c,
numbering=yes]
\starttext
\typeCfile{main.c}
\stoptext
main.c:
/*----------------------------------------------------------------------------------
* File: main.c
* Function: foo
* Description: bar
*----------------------------------------------------------------------------------*/
void main()
{
int i = 0;
i--;
return 0;
}
I cannot test this right now, but try by adding features=none
to disable ligatures for teletype fonts.
\definefontfamily [mainface] [tt] [Consolas][features=none]
[features=none]
solves the problem. Thank you so much for your help!
When my code contains multiple hyphens in a row, they are replaced with longer dashes. For example, in C code instead of
i--
I havei–
. Some of my comments also look incorrectly:instead of
Is there a way to control this or is it a bug?