Why is cmd not displaying these character(s)?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
taripo
Posts: 227
Joined: 01 Aug 2011 13:48

Why is cmd not displaying these character(s)?

#1 Post by taripo » 17 Jun 2015 10:56

What is the rule for what characters cmd can display

I have added

DejaVu Sans Mono and Droid Sans Mono to cmd

They are monospaced fonts that seem to meet all the criteria such that cmd needs, and they show in the Font tab of cmd.exe

Image

I did cmd /u

I try pasting in this character U+050A


Image


But all I get are blocks

Image

Why?

The font is supported. I did cmd /u What characters are supported and what character aren't supported

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Why is cmd not displaying these character(s)?

#2 Post by penpen » 17 Jun 2015 14:27

I've downloaded "Droid Sans Mono" from http://www.fontsquirrel.com/fonts/droid-sans-mono,
installed it (using the context menue item), and
changed the registry as described here:
http://www.techrepublic.com/blog/windows-and-office/quick-tip-add-fonts-to-the-command-prompt/.
(Because this font is visible in your "fonts" tab, i'm sure you have done the last part, too.)
In my case i have merged the registry file "DroidSansMono.reg":

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont]
"000"="Droid Sans Mono"

Important note: You may have to use another key instead of "000" (the first free of {"0", "00", "000", "0000", ...}).

It simply works with multiple characters testetd (including U+050A) using my win 8.1 (32 bit) without problems, so i guess you are using a different OS:
Which version are you running?


penpen

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Why is cmd not displaying these character(s)?

#3 Post by aGerman » 17 Jun 2015 14:41

They are monospaced fonts that seem to meet all the criteria such that cmd needs

To be monospaced isn't the only creteria. The font must not have any under- or overhang. The console buffer consists of "character cells". Under- or overhanging characters violate the boundary of these character cells which makes those fonts incompatible for any use in a Windows console window.

Very old but a good explanation and pretty much valid:
http://blogs.msdn.com/b/oldnewthing/archive/2007/05/16/2659903.aspx

BTW: I have no clue whether or not your chosen fonts are compatible because I don't know them ... Maybe penpen's suggestions will help.

Regards
aGerman

taripo
Posts: 227
Joined: 01 Aug 2011 13:48

Re: Why is cmd not displaying these character(s)?

#4 Post by taripo » 17 Jun 2015 17:06

Mod Edit: this correction was added to the end by Taripo - and was placed at the beginning so you would know that the information in the post had been superceded.

CORRECTION

I think I had it on the wrong Font!
===============================

I know that re criteria, it's in the techrepublic link that penpen mentioned, which I also used to get the font listed in the font tab as in the screenshot. I did not mean monospaced was the only criteria. two 3rd party ones, DejaVu Sans Mono and Droid Sans Mono do appear, and I think to appear they have to meet all the criteria.

I right clicked the font, clicked install. (which I have no doubt was correct)

I used the same techrepublic link as penpen, same procedure (same registry edit described at that link) to get the font appearing in the cmd window. Same font(Droid sans mono). But our OSs differ so maybe as penpen suggested, that might be it. I am on Windows 7 Ultimate 6.1 64bit, he is on Windows 8.1 32bit. It worked for him but not for me.

Maybe it's a Win 7 vs Win 8 thing?

CORRECTION

I think I had it on the wrong Font!

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Why is cmd not displaying these character(s)?

#5 Post by penpen » 18 Jun 2015 03:28

According to the techrepublic article, this "technique will work in Windows XP, 7, and 8", but they haven't listed Windows Vista, so it might be not possible there.
I can confirm, that this works since Windows XP (professional, 32 bit, SP3) with The TTF "Consolas".

So i assume it should work for your windows 7 as well, maybe possibly except an Windows 7 upgraded from Windows Vista.
But i haven't tested it, so it may or may not work.

I will try to add "DejaVu Sans Mono", maybe they somehow interact.


penpen

taripo
Posts: 227
Joined: 01 Aug 2011 13:48

Re: Why is cmd not displaying these character(s)?

#6 Post by taripo » 18 Jun 2015 03:46

Hi.. penpen, it's fine.. I had the wrong font set.

Note- I edited my last post to say at the end "CORRECTION..." but that line got removed somehow(a mod edit) and put at the beginning as if it was a title, which I think isn't as clear 'cos it looks like my last words are asking if there's a difference between Win7 and Win8 on this.. My last line(prior to it getting moved), was "CORRECTION" i.e. to everything in that post and all before it, saying I had the wrong font set..

So.. it's all fine.

What happened was, I had Droid set and (thinking I had DejaVu set), I picked a character from DejaVu or vice versa.

As long as I verified I chose droid and picked a character from Droid.

Or that I chose dejavu and picked a character from dejavu,

then it was fine.

Thanks

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Why is cmd not displaying these character(s)?

#7 Post by penpen » 18 Jun 2015 04:02

OK :D , and thanks (i wonder how long i would have searched for an issue...):
I read your post last night and was too tired to answer immediately,
so i answered today without re-reading your post, and
somehow :oops: i haven't seen the change... .

penpen

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Why is cmd not displaying these character(s)?

#8 Post by foxidrive » 18 Jun 2015 04:39

taripo wrote: My last line(prior to it getting moved), was "CORRECTION" i.e. to everything in that post and all before it, saying I had the wrong font set..


The reason it was moved to the beginning is because people would have to read your entire post for no reason at all, and THEN see it was invalid.

I clarified that edit - sorry I didn't make it clearer to begin with.

Post Reply