Typing subscripts on console or other custom speial characters?

Oct 12, 2018 at 2:47pm
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 Oct 12, 2018 at 2:48pm
Oct 12, 2018 at 3:01pm
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 Oct 12, 2018 at 3:03pm
Oct 12, 2018 at 9:37pm
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.
Oct 13, 2018 at 9:13am
But will compiled .exe's possess the same behavior with other computers too or that's one grey area?
Oct 13, 2018 at 9:40am
What OS do you use?
Oct 13, 2018 at 10:45am
I use Windows
Oct 13, 2018 at 8:17pm
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 Oct 13, 2018 at 8:18pm
Topic archived. No new replies allowed.