TSE: Linux: About using SetFont()

22 views
Skip to first unread message

knud van eeden

unread,
Jun 24, 2025, 11:01:58 AM6/24/25
to SemWare TSE Pro Text Editor
Hello,

1. I assume that this is NOT supposed to work when one wants to set a different font:

PROC Main()
 SetFont( "Terminal", 6, _FONT_OEM_ )
END

when running it in 'e' in TSE for Linux.

2. See also the 'help' for SetFont() in TSE:

'This command has no effect in the console version of the editor'

3. Is 'e' thus a console version should be the conclusion?

4. Otherwise is there any way to change the font 

5. E.g. to use the TSE drawing options (up, down, left, right, ...), which work in 'Terminal' font, 
   but not in e.g. font 'Courier New'.

6. What is the default font thus used in 'e'?

Thanks
with friendly greetings
Knud van Eeden



knud van eeden

unread,
Jun 24, 2025, 11:16:55 AM6/24/25
to SemWare TSE Pro Text Editor
This also does not work:

--- cut here: begin --------------------------------------------------

PROC Main()
 Set( FontName, "Terminal" )
 Set( FontSize, 6 )
 Set( FontFlags, _NONE_ )
END

--- cut here: end ----------------------------------------------------

but if you create an ASCII file of your TSE for Linux settings it shows
that the default font is set there as:

FontName                = "Courier New"
FontSize                = 10        // Point Size
FontFlags               = _NONE_

and if your run the above (Set()) then save the settings again, then it does set it in the settings

FontName                = "Terminal"
FontSize                = 6         // Point Size
FontFlags               = _NONE_




Guy Rouillier

unread,
Jun 24, 2025, 7:21:36 PM6/24/25
to SemWare TSE Pro Text Editor
The font used in a console application is determined by the terminal in which the app is running.  So, use your terminal's preferences to select the font you want.  Imagine how annoying for the end user if every app you run in a terminal could change the font.

That's not a concern for a GUI app, since each such app runs in its own window.

--
Guy Rouillier


------ Original Message ------
From "'knud van eeden' via SemWare TSE Pro text editor" <sem...@googlegroups.com>
To "SemWare TSE Pro Text Editor" <sem...@googlegroups.com>
Date 6/24/2025 11:01:21 AM
Subject [TSE] TSE: Linux: About using SetFont()
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/semware/1742243049.1965280.1750777281413%40mail.yahoo.com.

Virus-free.www.avast.com

knud van eeden

unread,
Jun 24, 2025, 8:34:12 PM6/24/25
to Semware TSE Pro
Yes, I found that out in the meantime, so that is resolved. 
Selecting the font is a bit hidden behind that 'Penguin' icon in Linux Ubuntu WSL inside the 'properties' link.

What remains now is to find a good font which emulates 'Terminal' in a good way (e.g. drawing the graphics characters) also in Linux Ubuntu WSL, that is what is wanted).

That font should thus be code page 437 or code page 850 compatible.

It must be for Microsoft Windows thus, because the Linux WSL terminal runs in it.

Of course TSE Terminal works in the TSE for Microsoft Windows window, but the Terminal font not present in the TSE for Linux WSL terminal.

So looking for a good Terminal like font which is also seen / detected in that TSE for Linux WSL terminal.

Really very difficult to find a good candidate.

with friendly greetings
Knud van Eeden

knud van eeden

unread,
Jun 25, 2025, 7:13:05 AM6/25/25
to Semware TSE Pro
TSE Terminal font (see the third screenshot below) is thus an implementation
of Microsoft Windows Code Page 850
(and certainly not Microsoft Windows Code Page 437 which has a different
character mapping see the first screenshot below).

So the Terminal font characters map exactly to the Code Page 850 characters with the same number (see the second screenshot below)

So looked for is some other Microsoft Windows font (other than Terminal) that follows Code Page 850 preferably exactly.

===


Inline image


Code Page 850


Inline image

TSE Terminal font showing the characters (menu > 'Utils' > 'ASCII chart'

Inline image



Carlo Hogeveen

unread,
Jun 25, 2025, 10:40:42 AM6/25/25
to sem...@googlegroups.com

A short answer,

As far as I know Linux TSE hardcoded uses code page 1252 for editing and an imperfect version of code page 437 for borders and help text.

If I am right, then even if you could set a Terminal-like font for the terminal or in Linux, then Linux TSE will still ignore it.

If you only need line-drawing characters in Linux TSE for special files and/or in special situations, then you could write a tiny macro and/or define keys around this trick:

In the Macro Execute menu, type these commands to enable and disable TSE's _DISPLAY_HELP_ mode:
execute DisplayMode(_DISPLAY_HELP_)
execute DisplayMode(_DISPLAY_TEXT_)
Inside this prompt the "execute" is mandatory and must be in small letters.

In _DISPLAY_HELP_ mode most of TSE's line drawing (characters) work(s), but you see text in help colors, syntax hiliting does not work, and a few characters do not adhere to code page 437.

Carlo



knud van eeden

unread,
Jun 25, 2025, 3:02:25 PM6/25/25
to Semware TSE Pro
1. The 'Perfect DOS VGA 437' font implements Code Page 437 and can be installed in
Microsoft Windows and then be chosen in the WSL terminal.

Better even should be a font version for Code Page 850 thus, but still not found.

So for now installing that font is the best approximation of using the TSE terminal font
in a TSE for Linux console.

One can use the TSE drawing keys to draw
and e.g. separators like I frequently use.

So one possible next step towards a possible goal of in making TSE for Linux as much the same as possible
as TSE for Microsoft Windows.

Inline image


Inline image


---

2. It is actually even more complicated:

If you in TSE choose the Terminal font with fontsize 5 and regular it will show the characters from Code Page 437
(if you select menu > 'Util' > 'ASCII chart').
You can e.g.run the Microsoft 'magnifier' to see this (very small font).

If you in TSE choose the Terminal font with a fontsize greater than 5 (e.g. 6, 9, and regular it will show the characters from Code Page 850
(if you select menu > 'Util' > 'ASCII chart')

So it uses 2 different code pages, 437 and 850 dependent on the font size you choose.

But code page 850 is thus the 'dominant' page because that is used by all fontsize larger than 5
(and using font size 5 itself is barely readable, even on a 75 inch monitor.

===

3. Fonts used and the code pages they implement (and available in my TSE for Microsoft Windows)

@FangSong                      implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
@KaiTi                         implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
@MS Gothic                     implements the characters of Code Page 932 (Shift-JIS) (Japanese fonts)
@MS Mincho                     implements the characters of Code Page 932 (Shift-JIS) (Japanese fonts)
@NSimSun                       implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
@SimHei                        implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
@SimSun-ExtB                   implements the characters of Code Page 936 (GBK extensions) (Chinese Fonts)
@SimSun-ExtG                   implements the characters of Code Page 936 (GB18030 extensions) (Chinese Fonts)
@Terminus (TTF) for Windows    implements the characters of Code Page 1252 (DOS/VGA-Based Fonts)
BBCWin                         implements the characters of Code Page 1252 (Acorn/BBC Micro heritage)
Cascadia Code                  implements the characters of Code Page 1252 (Unicode-focused but includes Latin-1) (Western Fonts)
Cascadia Mono                  implements the characters of Code Page 1252 (Unicode-focused but includes Latin-1) (Western Fonts)
Consolas                       implements the characters of Code Page 1252 (Windows Latin-1)
Courier                        implements the characters of Code Page 1252 (legacy, often matches system default) (Western Fonts)
Courier New                    implements the characters of Code Page 1252 (Windows Latin-1) (Western Fonts) (Western Fonts)
CSD16                          implements the characters of Code Page n/a (do not use, all kind of colorful unusual characters)
FangSong                       implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
Fixedsys                       implements the characters of Code Page 1252 (seems an unfinished product, a lot of the same characters)
KaiTi                          implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
Less Perfect DOS VGA            implements the characters of Code Page 1252 (seems an unfinished product, a lot of the same characters)
More Perfect DOS VGA            implements the characters of Code Page 1252 (seems an unfinished product, a lot of the same characters)
Lucida Console                 implements the characters of Code Page 1252 (Western Fonts)
Lucida Sans Typewriter         implements the characters of Code Page 1252 (Western Fonts)
MS Gothic                      implements the characters of Code Page 932 (Shift-JIS) (Japanese fonts)
MS Mincho                      implements the characters of Code Page 932 (Shift-JIS) (Japanese fonts)
NSimSun                        implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
Perfect DOS VGA                implements the characters of Code Page 437 (DOS/VGA-Based Fonts)
Perfect DOS VGA Win            implements the characters of Code Page 1252 (seems an unfinished product, a lot of the same characters)
Simhei                         implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
SimSun-ExtB                    implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
SimSun-ExtG                    implements the characters of Code Page 936 (GB2312/GBK) (Chinese Fonts)
Terminal                       implements the characters of Code Page 437 and 850 (Multilingual - Latin-1) (DOS/VGA-Based Fonts)
Terminus (TTF) for Windows     implements the characters of Code Page 1252 (DOS/VGA-Based Fonts)



Carlo Hogeveen

unread,
Jun 25, 2025, 7:11:10 PM6/25/25
to sem...@googlegroups.com

I can reproduce, that in Windows GUI TSE the Terminal font uses the global Windows system code page (typically 437 or 850) for font sizes > 5, but always uses code page 437 for Terminal font size 5.
What a cool and nerdy find!

Carlo



Knud van Eeden

unread,
Jun 27, 2025, 12:10:59 PM6/27/25
to sem...@googlegroups.com, Knud van Eeden
Thanks.

Perfect DOS VGA 437 font in Linux WSL:

Drawing OK and code page 437.

with friendly greetings
Knud van Eeden

image.png

--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Knud van Eeden

unread,
Jun 27, 2025, 12:18:18 PM6/27/25
to sem...@googlegroups.com, Knud van Eeden
Thanks.

That seems to be a property of Terminal Font (which is not one font, but a whole collection of sub fonts. Depending on the size a different font type is selected. Seemingly for some reason still in Code Page 437 here thus. There is thus even a (very big) difference
here between having now globally in Microsoft Windows the Code Page 437 set instead of globally Code Page 850.

FYIO: Note: you have (earlier) already mentioned in its help text this 5 and >5 Code Page 437 or not behavior in your TSE program 'CursorShape.s', I noticed that a couple of days ago after seeing it here myself.
I look at the end of the ASCII chart and saw there a very small 'square root' character. And that is typically Code Page 437 only. If 850 then one sees '1', '2', '3' at tend.

with friendly greetings
Knud van Eeden

with friendly greetings
Knud van Eeden
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages