Welcome!

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

SignUp Now!

Question About @TCFONT

Jun
762
16
I just upgraded to version 33 and am playing around with some of the new features. In testing the @tcfont function, I got a result that surprised me.

Code:
>echo %@tcfont[1]
-16

First, why is the value a negative number? Second, I have the font set to 12 pt, so why is the value reported 16 rather than 12?
 
This is what I get from TCC;
Code:
E:\Utils>echo %@tcfont[0]
TCC: (Sys) The parameter is incorrect.
 "%@tcfont[0]"

E:\Utils>echo %@tcfont[1]
TCC: (Sys) The parameter is incorrect.
 "%@tcfont[1]"

E:\Utils>echo %@tcfont[2]
TCC: (Sys) The parameter is incorrect.
 "%@tcfont[2]"

E:\Utils>ver

TCC  33.00.15 x64   Windows 10 [Version 10.0.19045.5131]

This is what I get from the @Charles Dye plugin ConFont;
Code:
R:\>font
IBM 3270  16 × 34  (bold)

R:\>which font
font is a plugin command (ConFont)

R:\>plugin /i confont
Module:      e:\utils\confont.dll
Name:        ConFont
Author:      Charles Dye
Email:       [email protected]
Web:         http://charlesdye.net/plugins/confont.html
Description: ConFont plugin for TCC/LE
Implements:  font,@font
Version:     1.0  Build 4

R:\>echo %@font[0]
IBM 3270

R:\>echo %@font[1]
16

R:\>echo %@font[2]
34

Ref: ConFont Plugin

Joe
 
This is what I get from TCC;
Code:
E:\Utils>echo %@tcfont[0]
TCC: (Sys) The parameter is incorrect.
 "%@tcfont[0]"

....

This is what I get from the [USER=9]@Charles Dye[/USER] plugin ConFont;
[code]R:\>font
IBM 3270  16 × 34  (bold)

They're not the same thing. @TCFONT reports the font used by Take Command in its tab windows. @FONT, whether from the plugin or TCC's native @FONT, reports the font used by TCC's console window.

(And, just out of curiosity, why are you even using that plugin? What does it do for you? I don't even know why I uploaded it; by accident most likely.)
[/QUOTE]
 
I just upgraded to version 33 and am playing around with some of the new features. In testing the @tcfont function, I got a result that surprised me.

Code:
>echo %@tcfont[1]
-16

First, why is the value a negative number? Second, I have the font set to 12 pt, so why is the value reported 16 rather than 12?

I suspect this function reports the values Take Command passed to CreateFont() or one of its siblings.
 
You are correct, Charles.
Code:
R:\>which @font
@font is an internal variable

R:\>echo %@font[0]
IBM 3270

R:\>echo %@font[1]
16

R:\>echo %@font[2]
34

I believe that I use your plugin so that I can determine the current font from the TCC Console;
Code:
R:\>plugin /l confront
ConFont v1.0.4 loaded.

R:\>font
IBM 3270  19 × 34  (bold)

The internal FONT command can only change the font,
not display the current font.

Joe
 
I am running the command in a TCMD tab.

>do i = 0 to 2 (echo %@tcfont[%i])
Consolas
-16
400

Here is my TCMD setup:

1732727443976.webp
 
Ah, thank you! The function is reporting the actual size on the screen rather than the font setting.

Oops. Not so fast. I just brought up my display settings, and the scaling is 100%.

1732729061696.webp
 
Back
Top