4

Just a quick question. For the roman numerals above 3999, we used to represent them using a overline. For representing 4000, we will be using the following:

So, to display this overline, what should I do? Also, please advice me which of the above is right?


Update #1

I saw somewhere that we can use Unicode Characters by using the following code:

Console.OutputEncoding = System.Text.Encoding.Unicode;
Console.WriteLine("H\u0305");
Console.WriteLine("\u0305H");
Console.ReadLine();

After putting this code, I have set my console to use Consolas font at 14pt. I got this output:

I was expecting either of the code to show me a combined version, but no avail.

Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
  • I image you'll have to use some double spacing, putting an underscore `_` on the first line – Jonesopolis Oct 30 '14 at 19:30
  • @Jonesy Good idea, but tough. Something better? Can keep as a last option. – Praveen Kumar Purushothaman Oct 30 '14 at 19:30
  • There is a 'Combining Overline' , see [here](http://stackoverflow.com/questions/18127029/how-to-display-overlined-letters-in-net), but getting it to work in the console is gonna take some luck.. If you succeed, do post your findings!! - On your other question: I would much prefer the 1st version. – TaW Oct 30 '14 at 19:37
  • I tried to combine, but didn't work! `:(` I am updating the question. – Praveen Kumar Purushothaman Oct 30 '14 at 19:46
  • @TaW I have updated the question, please check. – Praveen Kumar Purushothaman Oct 30 '14 at 19:52
  • I'm not surprised, even many or most browsers have trouble displaying these combining characters right; (there are others, like underline and bows.) [This](http://stackoverflow.com/questions/5237666/adding-text-decorations-to-console-output) post sounds as if there really is __no__ way. (Other than doublespacing or using colors) – TaW Oct 30 '14 at 20:14

1 Answers1

-1

In the console? You can't. Drawing to the console in such a manner is not possible as the console only supports characters.

One does exist in Unicode (as seen here) but this is merely an overlined space.

phantom
  • 1,457
  • 7
  • 15
  • Not drawing, but any characters or the specified set of characters with an overline? – Praveen Kumar Purushothaman Oct 30 '14 at 19:30
  • @PraveenKumar There is an overlined space as you can see in the link I gave you in the answer. – phantom Oct 30 '14 at 19:32
  • @PraveenKumar As I stated in my answer `In the console? You can't. Drawing to the console in such a manner is not possible as the console only supports characters.` – phantom Nov 04 '14 at 14:48
  • I know buddy, what can I do? When something is NOT possible, we can't do anything about it. Thought of other solutions too, nothing worked. Just waiting for someone to implement something. Let's see! `:)` Thanks for your effort though@ – Praveen Kumar Purushothaman Nov 04 '14 at 14:50