Cmdgfx - draw 3d and graphic primitives (polygons,circles etc) in cmd window (now with 24-bit RGB support!)

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
misol101
Posts: 384
Joined: 02 May 2016 18:20

Re: Cmdgfx - draw 3d and graphic primitives (polygons,circles etc) in cmd window (now with 24-bit RGB support!)

#106 Post by misol101 » 28 Jun 2019 14:32

Aacini wrote:
28 Jun 2019 12:15
Wow! The writing of text is fantastic! This remembers me my old method to write text in pixel mode. Where do you get the definition of the raster fonts, so you can read them?
Glad you like it!

If you clone the git repo (link in first post), you will find a file called cmdfonts.h, which contains all the data necessary for the 10 raster fonts. It is embedded in cmdgfx_gdi.exe and cmdgfx_RGB.exe. On page 3 of this thread I have posted some C code showing how to use (one of) the font data arrays in cmdfonts.h.

The data itself (if I remember correctly) was retrieved using a combo of a batch script (to write characters in ASCII order at the top of the cmd line), a screengrab tool (to save the text as bitmap), ImageMagick to print out the pixels in the bitmap as text data, and a little C code to organize the data into 1-bit-per-pixel data arrays (finally producing cmdfonts.h)

Post Reply