Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to set the TCC font to use Nerd Fonts?

Aug
197
5
I've been using TCC a lot more than TakeCommand lately, since learning its visual display is rock solid by comparison, but I've run into a bit of an issue. In particular, I can't seem to find any way to configure TCC to use the font I want, namely one of the nerd fonts and to be more specific the 0xProto Nerd Font at the top of this page. Oddly enough, I can use a bit of a hack to create a Windows Terminal profile that uses the TCC executable and specifies that font, but after almost 30 years of hitting the start button and entering "TCC" to launch TCC, well, it would be nice if I could get the app itself to use that somehow without my having to wrap it in a custom Windows Terminal profile.

As an aside, I find I can get TakeCommand to use that font, but boy does any invoking of software like Neovim corrupt the display badly if I'm using any font size other than 11. Completely reliable visual freak out. Thanks in advance!
 
From the TCC Prompt,
this is how I set the IBM 3270 font that I use;
Code:
if %_tctabs eq 0 setfont 0 16 34 700 "IBM 3270"

setfont is from the 4CONSOLE plugin.

Joe
 
It boils down to editing a registry key. There is a discussion of it here, maybe better discussions elsewhere. Windows is a little finicky about what fonts the console can use.
 
From the TCC Prompt,
this is how I set the IBM 3270 font that I use;
Code:
if %_tctabs eq 0 setfont 0 16 34 700 "IBM 3270"

setfont is from the 4CONSOLE plugin.

Joe
First, thanks for calling those plugins to my attention. I was unaware of them. But second, unlike all the other plugins I've used so far (which admittedly isn't many) they don't seem to work at all. I tried copying the 4console.dll file into my C:\Program Files\JPSoft\TCMD33\plugins folder and found none of the commands were available in TCC. So then I tried copying the 4console64.dll file instead but still none of the commands are available. Is there something special I need to do to use that?
 
I don't know how old your copy is, but new enough ones will silently not load if TCC is in WIndows Console. Otherwise, if 4CONSOLE fails to load there should be an error message (from TCC). I doubt SETFONT will will work unless 0xProto Nerd is properly registered as a console font.
 
I don't know how old your copy is, but new enough ones will silently not load if TCC is in WIndows Console. Otherwise, if 4CONSOLE fails to load there should be an error message (from TCC). I doubt SETFONT will will work unless 0xProto Nerd is properly registered as a console font.
I'm using what I believe to be the latest version of TCC:
TCC 33.00.11 x64 Windows 11 [Version 10.0.22631.4317]
So I don't think it's out of date. There's no error message shown. I haven't been able to find any reference so far for how I could see which plugins are loaded and list them or something. They've just all worked until now.
 
Heh. I just wrote in my prior message that I couldn't find any way to list plugins or whatever before seeing your message. When I explicitly load the plugin with the following, I don't get any error but the setfont function is not there.
plugin /l C:\Program Files\JPSoft\TCMD33\plugins\4Console64.dll
When I then try to run the setfont command I get the following:
TCC: Unknown command "setfont"
And for the reference, running the plugin /I command doesn't show it loaded.
 
It boils down to editing a registry key. There is a discussion of it here, maybe better discussions elsewhere. Windows is a little finicky about what fonts the console can use.
Thanks for that discussion! Using that thread, I was able to add the desired font to the list of available console fonts, as I can see both in the registry editor and in the properties for the CMD shortcut properties. But when I edit the TCC shortcut in the start menu and specify the font I want, it doesn't change the font in the app when I launch it. Maybe I'm missing something?
 
All I did was ... downloaded the ZIP file, 2clicked on the "0xProtoNerdFontMono-Regular.ttf", chose install. It was automatically registered as a console font. Then in a console, Alt-SPace-Properties ... font ... chose it. Now I have this (see pic).

Note that I did not use SETFONT. What does PLUGIN 4CONSOLE (or just PLUGIN) show you?

1729047254994.webp
 
All I did was ... downloaded the ZIP file, 2clicked on the "0xProtoNerdFontMono-Regular.ttf", chose install. It was automatically registered as a console font. Then in a console, Alt-SPace-Properties ... font ... chose it. Now I have this (see pic).

Note that I did not use SETFONT. What does PLUGIN 4CONSOLE (or just PLUGIN) show you?

View attachment 4589
Aha! I solved it! But not quite how you described. First, thanks for that suggestion. It led me to the right place. Second, let me recap what I did before even posting for future reference. All I did was download the font and install it as you did. I then opened TCC and opened the settings, as you did, and I changed the appearance for my Windows Terminal profile named TCC, because that's what it showed was being used. That profile has been set to the correct font the whole time, and the little "hack" I mentioned above was to launch it as follows:
wt.exe new-tab --profile "TCC"
As long as I launched it like that, I'd have the right font. But if I hit the Windows Start button and chose the TCC shortcut, I would have the wrong font. But what I just learned is that even though the settings I see by opening TCC, hitting Alt + Space, and choosing the Settings option show me that it's using the "TCC" profile, those aren't actually the settings being used. I don't know why because that "TCC" profile is specified as the default.

But for some reason, if I edit the appearance of the listed "Defaults" profile instead, which isn't the default profile according to the same damn screen, then I can get the correct font to show. In retrospect, I don't think any of those hoops through which I jumped to get the font installed into Windows and into the registry and what not made any difference. But apparently under Windows 11 Pro x64, the default profile appearance is used only if you explicitly specify that profile on the command line; otherwise, it somehow uses the "Defaults" for appearance. I don't get it. But then I take it as just more proof how hard Windows sucks.

Thanks to all who helped. Oh, and in answer to your question, when I run the plugin 4console command, it shows me no output. It doesn't give me an error, it just gives me no output at all.
 
4CONSOLE won't load in Windows Terminal (and PLUGIN 4CONSOLE will give nothing) . Are you sure you're in a console?
 
4CONSOLE won't load in Windows Terminal (and PLUGIN 4CONSOLE will give nothing) . Are you sure you're in a console?
Well I'm not sure precisely what 'console' means, but I can tell you I've been using TCC the whole time. Is that a console? I took a little screen capture this morning to illustrate and attached it in a zip archive for viewing. The attached video demonstrates how I have the plugin files in the plugins folder in my usual Take Command v33 plugins directory (C:\Program Files\JPSoft\TCMD33\plugins), backs up a level to start TCC from within the Take Command v33 installation folder, and then runs couple commands to show how the 4CONSOLE plugin does not seem to be loading or working.
 

Attachments

When I am running TCC.EXE from Windows Terminal,
and I run the following command,
it returns...
Code:
E:\Utils>echo %@pidcommand[%_ppid] 
"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.20.11781.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe" new-tab --profile "{6c14e463-4d2f-4856-bb52-00b61f87aa3f}" --startingDirectory "e:\utils"

When I am not running TCC.EXE from Windows Terminal,
and I run the following command,
it returns...
Code:
E:\Utils>echo %@pidcommand[%_ppid] 
C:\WINDOWS\Explorer.EXE

What do you get when you run the command on your TCC?

Joe
 
Console in the background; Windows Terminal in the foreground.

1729085615069.webp
 
When I am running TCC.EXE from Windows Terminal,
and I run the following command,
it returns...
Code:
E:\Utils>echo %@pidcommand[%_ppid]
"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.20.11781.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe" new-tab --profile "{6c14e463-4d2f-4856-bb52-00b61f87aa3f}" --startingDirectory "e:\utils"

When I am not running TCC.EXE from Windows Terminal,
and I run the following command,
it returns...
Code:
E:\Utils>echo %@pidcommand[%_ppid]
C:\WINDOWS\Explorer.EXE

What do you get when you run the command on your TCC?

Joe
What that command produces is highly dependent on how TCC is started (and how WT is started). Right now, I see this.

1729086719449.webp
 
When I am running TCC.EXE from Windows Terminal,
and I run the following command,
it returns...
Code:
E:\Utils>echo %@pidcommand[%_ppid]
"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.20.11781.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe" new-tab --profile "{6c14e463-4d2f-4856-bb52-00b61f87aa3f}" --startingDirectory "e:\utils"

When I am not running TCC.EXE from Windows Terminal,
and I run the following command,
it returns...
Code:
E:\Utils>echo %@pidcommand[%_ppid]
C:\WINDOWS\Explorer.EXE

What do you get when you run the command on your TCC?

Joe
I get the following:
Wed 10/16/24 07:25:23 Mem(21%) Dirs() LastCmd(0)
E:\Src> echo %@pidcommand[%_ppid]
C:\WINDOWS\Explorer.EXE
Does that help? Does that mean my launching TCC from the Windows Start menu is or is not a 'console'?
 
I'm thinking maybe there should be a sticky thread on the differences between the traditional console and Windows Terminal. How to tell the difference, and what works and doesn't work in each.
Yeah, and I guess I have to ask: if it's a bad thing to run TCC in the Windows Terminal, how do I not do that? I mean, I run the product installer and it puts shortcuts in the Windows Start menu for me, and all I'm doing is use those shortcuts. For the sake of that video I captured, I double-clicked the tcc.exe file directly as listed in my Windows Explorer. If there's some magic way to start a console versus non-console version of TCC, or run it in Windows Terminal or not in Windows Terminal, and/or those have serious implications for how it behaves, that would be good to know. And document. And maybe call out. Because I've been using TakeCommand and TCC in essentially the same ways since version one, and this is the first I'm hearing of any of this.
 
Does it look like a console or like Windows Terminal?

If you're not seeing a console, try this:

c:\windows\system32\conhost.exe "[path_to]\tcc.exe"

I am not familiar with Windows 11. I'd appreciate info on how Windows Terminal, as a feature of Windows 11 actually works.
 
Does it look like a console or like Windows Terminal?

If you're not seeing a console, try this:

c:\windows\system32\conhost.exe "[path_to]\tcc.exe"

I am not familiar with Windows 11. I'd appreciate info on how Windows Terminal, as a feature of Windows 11 actually works.
I guess with the screenshot you provided above as reference, it always looks like what you call "Windows Terminal" and not what you call a "console". No matter how I run TCC, it always appears as a tab in a window like your foreground app in the screenshot above, the lone exception being when I run that command you provided. When I do that instead, then it looks like what you call a "console".
 
Yeah, and I guess I have to ask: if it's a bad thing to run TCC in the Windows Terminal, how do I not do that? I mean, I run the product installer and it puts shortcuts in the Windows Start menu for me, and all I'm doing is use those shortcuts. For the sake of that video I captured, I double-clicked the tcc.exe file directly as listed in my Windows Explorer. If there's some magic way to start a console versus non-console version of TCC, or run it in Windows Terminal or not in Windows Terminal, and/or those have serious implications for how it behaves, that would be good to know. And document. And maybe call out. Because I've been using TakeCommand and TCC in essentially the same ways since version one, and this is the first I'm hearing of any of this.

There's no right or wrong way; it's largely a matter of taste, and I apologize if I sounded as if you were doing something wrong. Windows Terminal is newer and certainly prettier. But TCC was designed for the console, and there are a few minor issues with running it in Terminal. Probably the most significant is that popup windows like the command history and directory history popups don't return focus to the main window when you close them.
 
Yeah, and I guess I have to ask: if it's a bad thing to run TCC in the Windows Terminal, how do I not do that? I mean, I run the product installer and it puts shortcuts in the Windows Start menu for me, and all I'm doing is use those shortcuts. For the sake of that video I captured, I double-clicked the tcc.exe file directly as listed in my Windows Explorer. If there's some magic way to start a console versus non-console version of TCC, or run it in Windows Terminal or not in Windows Terminal, and/or those have serious implications for how it behaves, that would be good to know. And document. And maybe call out. Because I've been using TakeCommand and TCC in essentially the same ways since version one, and this is the first I'm hearing of any of this.

And to answer your question: The only way I know to choose how Windows runs console apps like TCC is through the Windows Terminal settings.

Terminal-settings.webp


On my system the default is "Let Windows decide", and I'm happy with that. But you can change it to make console apps run in the older console environment, or make them use Windows Terminal. Experiment with it and see what works for you.

The registry hack Vincent pointed you to only affects the console. Windows Terminal lets you set the font through settings, and it's much more liberal about which fonts it allows. No registry hack needed.
 
And to answer your question: The only way I know to choose how Windows runs console apps like TCC is through the Windows Terminal settings.
Thanks for that. That's not in my WT settings (Windows 10, unzip-only install of WT and WT preview, both updated today).

I'd bet it can also be done here, in the console's default settings. Is that so on Windows 11?

1729096859625.webp
 
The registry hack Vincent pointed you to only affects the console. Windows Terminal lets you set the font through settings, and it's much more liberal about which fonts it allows. No registry hack needed.
That wasn't necessary here. Here, installing the font did it.
 
Is that the console properties? The Alt-Space dialog? Mine does not have a 'Terminal' tab:

Console-props.webp
 
Is that the console properties? The Alt-Space dialog? Mine does not have a 'Terminal' tab:
Yeah, that's what it is. I wonder if the setting exists somewhere else. If you've made conhost the default, it could be hard to get to WT's settings.

Do you have both "Defaults" and "Properties"? If so, is it on "Defaults"?

1729098092673.webp
 
Yes, I do have both Defaults and Properties. Same tabs on both, though.

I don't know why my Windows property pages are different from yours. Consistency is just for the little people, perhaps?
 
There's no right or wrong way; it's largely a matter of taste, and I apologize if I sounded as if you were doing something wrong. Windows Terminal is newer and certainly prettier. But TCC was designed for the console, and there are a few minor issues with running it in Terminal. Probably the most significant is that popup windows like the command history and directory history popups don't return focus to the main window when you close them.
That's very thoughtful of you to apologize, but I didn't take it that way for what it's worth. I'm sorry too if I seemed like I was being hostile or accusatory. I'm just frustrated that yet again I've discovered how Microsoft thought it would be a great idea to shove some wonderful new way of doing things down our throats. I had no idea why the "console" look changed to include tabs; it just did. Now I understand what you were on about, and thanks for showing me how to change the default setting for that. That also makes sense of what I was seeing with the font issues, and since starting TCC via the console host you showed me, I found I could select my preferred font there as well--presumably because of the registry gymnastics I did the other night.
 
Yes, I do have both Defaults and Properties. Same tabs on both, though.

I don't know why my Windows property pages are different from yours. Consistency is just for the little people, perhaps?
You have Windows 11, right? I once installed the store version of WT (long gone, now). But if that did it, I'd expect it to be there in Windows 11. It can't be the "stock" Windows 10 dialog because Windows 10 predates WT. A couple years ago there was some chatter on GitHub\WT about now_you_can_make_WT_the_default_on_Win10 but, IIRC, I never did anything about it.

@Phileosophos, does 4CONSOLE work when you're in a console?
 
Back
Top