Typing subscripts on console or other custom speial characters?

Is there any way to implement subscripts and superscripts (besides 1, 2 and 3 which are available as ASCII values, for subscript).

And how about special characters? For instance I want to symbolically represent a double bond (like in chemistry) or a triple bond. Or even a gingerbread man!

Last edited on
does your console support unicode?
you may find a way to do it with that.
with just straight up ascii in a console, you cannot really. your font size is fixed, but you can do things to make it on the line above or below. there are some extensions line ncurses that may let you change font size on a character by character basis. I am not sure what all it can do, I stopped doing ascii art programs when windows 95 came out...

It is also not too hard to go into graphics mode and draw it as a graphic instead. Most graphics libraries have a pretty simple put-text type command where you can specify location, color, size, etc.
Last edited on
You have run into a OS-specific issue. On Windows you will need to change the current code page (I recommend UTF-8, 65001) and make sure you have a proper font in your console properties (Lucida Console Unicode). Unfortunately this is a user environment issue.

I'm on a road trip ATM, but come Tuesday or so I'll post something useful for you to help.
But will compiled .exe's possess the same behavior with other computers too or that's one grey area?
What OS do you use?
I use Windows
It is a user's environment issue, so you'll need special help on every new computer. Like I said, give a few days and I'll get you something that will help.
Last edited on
Topic archived. No new replies allowed.