S
S
sad_user12019-11-23 11:15:33
Windows
sad_user1, 2019-11-23 11:15:33

How to set fonts in the Windows console window from a C program?

There is such a code in C that worked for me under linux.

printf("                    ███─████─████\n");
sleep(1);
  printf("                    █───█──█─█──██\n");
sleep(1);
  printf("                    ███─████─█──██\n");
sleep(1);
  printf("                    ──█─█──█─█──██\n");
sleep(1);
  printf("                    ███─█──█─████\n");
  printf("\n\n");	
sleep(1);
  printf("                    ████─████─█───█─███\n");
sleep(1);
  printf("                    █────█──█─██─██─█\n");
sleep(1);
  printf("                    █─██─████─█─█─█─███\n");
sleep(1);
  printf("                    █──█─█──█─█───█─█\n");
sleep(1);
  printf("                    ████─█──█─█───█─███\n");
sleep(3);
++z;

But dark times fell on Hogwarts and I had to transfer everything to Windows, during which I ran into font problems in the console.
Cyrillic is displayed incorrectly.
My "squares" from the previous example don't work either.
And
with
this
: ║╚║╚╚══╝
is generally a mess.
The compiler used: x86_64-w64-mingw32-gcc
I have no idea what to google for me because I haven’t written a single line of code on Windows.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2019-11-23
@sad_user1

And how do you control what "font" you have on Linux?
The user cannot put himself a non-standard one, and then everything will fly on Linux?
Or are you confusing font and encoding?
I use conemu under Windows, I have Consolas 16 in size in all console commands, and everything is displayed perfectly
5dd91ec13520c799680758.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question