sagargoswami2001 / How-to-Setup-Graphics.h-for-Visual-Studio-Code

How to Setup Graphics.h for Visual Studio Code
18 stars 2 forks source link

installuserfont Not available in WinBGI #1

Closed uysuy closed 2 months ago

uysuy commented 2 months ago

Dear @sagargoswami2001 ,

I just a quick check in case we want to make it to support with installuserfont like turboC is it possible?

Thanks

sagargoswami2001 commented 2 months ago

Dear @uysuy

The installuserfont function from Turbo C/C++ isn’t directly supported in modern environments like Visual Studio Code. To handle custom fonts in your setup, consider using modern libraries such as SDL2 or SFML. These libraries offer robust support for custom fonts and graphics.

For SDL2:

Install SDL2 and SDL2_ttf.
Include headers: #include <SDL.h> and #include <SDL_ttf.h>.
Initialize SDL and TTF.
Load and use fonts with SDL2_ttf.