My English is not perfect, sorry.
I am using Visual C++ 2019 16.9.2 Community, and MFC. At debug mode, at the start of my program, there is an assertion error in a file what is part of MFC, at the line 666. So, I used release mode, IA-32 and AMD64 CPU architecture. I am using Consolas font, with size 9. At Visual Studio text editor, and at LibreOffice Writer (a word processor), this works correct. The most characters have the same width, some have not, but the cursor is always between 2 characters. Wide characters for example:
I tried CDC::GetCharWidth, CDC::GetOutputCharWidth, CDC::GetCharABCWidths. The most chacters are 20 pixel wide (3-times scale: 3*96 dpi = 288 dpi at Windows's setting), 6 characters have 0 width (not ABC-width). The ABC widths of the characters I wrote have 20 pixel width. I tried 0 instead of a negative A, C, width, but this did not help. But there is a bigger problem. These characters look correct if there are other characters after them. If has not, these are unknown unicodes:
const wchar_t text = L"∧∨∃∄∀∈∉∌∋∪⊂⊆⊄⊈⊃⊅⊇⊉⇒⇔≪≫∇⊥▲▼◆◇"; pDC->TextOutW(4, 0, text); pDC->TextOutW(4, 60, L"0000000000000000000000000000"); for (int i = 0, pos = 4; text[i]; pos += 20, ++i) pDC->TextOutW(pos, 120, text+i, 1); // ::TextOutW((HDC) *pDC, pos, 120, text+i, 1);
I tried CDC:: and global form of TextOutW so. This can not display these characters correctly. The number of 0s is 28 = number of special characters in text.