Page 1 of 1
Individual fonts to a file name
Posted: 31 Jan 2025 19:46
by PapaiMark
I received a file with a weird decorated and bold font.
Searching the net, nothing.
I discovered that using charmap it is possible (win10) to name a file even with the most unexpected fonts and symbols.
Colorize fonts, background, age, etc. Why not change the fonts itself, like
using a different font to name specific words like "setup" or changing the font for .lnk files, etc.
Just an idea.

- 1.jpg (31.66 KiB) Viewed 4305 times
Re: Individual fonts to a file name
Posted: 31 Jan 2025 20:30
by admin
Interesting. Could you attach such a file (zipped) to a post here?
Re: Individual fonts to a file name
Posted: 01 Feb 2025 09:16
by Garonne
Well... Stuff like colouring parts of filenames (differing from changing the entire filename, we already can do that; based on RegEx, mostly) would be intriguing to me, too.
Not sure about different fonts, though.
Re: Individual fonts to a file name
Posted: 05 Feb 2025 01:46
by PapaiMark
admin wrote: β31 Jan 2025 20:30
Interesting. Could you attach such a file (zipped) to a post here?
Sorry, the file is gone.
I myself could insert symbols, but couldn't change the font itself.
Maybe, who did it, modified a normal Windows font by changing the symbols to a draw of letters. It would be a wearisome job.
I remember that something like this was possible with the ancient Windows 98, typing right Alt + number pad numbers.
I really don't know how, but he (?) did it.
Using the font
"Segoe MDL2 Assets" Unicode, all letters change to weird symbols.
He (?) modified this one? I don't know.
Re: Individual fonts to a file name
Posted: 05 Feb 2025 11:31
by admin
These are just Unicode characters of one font. No font change involved. Nothing new.
Re: Individual fonts to a file name
Posted: 06 Feb 2025 22:40
by PapaiMark
AHA! I found it in the internet.
I don't know how they do it.
πΏπππ ππ π ππππ
File zipped and attached (0 bytes)
from
lingojam.com/TextFonts
There are some problems. Not all the text editors shows this font. Some shows ?????????????.txt
Seems that the forum considered the zip file with this font an "http error"

- 11.jpg (105.63 KiB) Viewed 4171 times
Re: Individual fonts to a file name
Posted: 07 Feb 2025 00:16
by kiwichick
PapaiMark wrote: β06 Feb 2025 22:40
Not all the text editors shows this font. Some shows ?????????????.txt
Who would've thought it was even possible to use fonts other than the system-defined one? I downloaded the file to see what happens. In Windows Notepad and Wordpad, the title bar shows the font. In Notepad++, the title bar shows ???????????.txt but the file tab shows the font.

- 2025-02-07_121044.png (21.64 KiB) Viewed 4163 times
Re: Individual fonts to a file name
Posted: 07 Feb 2025 09:43
by admin
The XY character table tells you something about it:
Code: Select all
# char dec hex utf8 utf8hex remark
1 55349 D835 High Surrogate
πΏ 56703 DD7F Γ°Ββ’ΒΏ F0 9D 95 BF Low Surrogate
2 55349 D835 High Surrogate
π 56717 DD8D Γ°ΒβΒ F0 9D 96 8D Low Surrogate
3 55349 D835 High Surrogate
π 56718 DD8E Γ°ΒβΕ½ F0 9D 96 8E Low Surrogate
4 55349 D835 High Surrogate
π 56728 DD98 Γ°ΒβΛ F0 9D 96 98 Low Surrogate
5 32 20 20
6 55349 D835 High Surrogate
π 56718 DD8E Γ°ΒβΕ½ F0 9D 96 8E Low Surrogate
7 55349 D835 High Surrogate
π 56728 DD98 Γ°ΒβΛ F0 9D 96 98 Low Surrogate
8 32 20 20
9 55349 D835 High Surrogate
π 56710 DD86 Γ°Βββ F0 9D 96 86 Low Surrogate
10 32 20 20
11 55349 D835 High Surrogate
π 56715 DD8B Γ°ΒββΉ F0 9D 96 8B Low Surrogate
12 55349 D835 High Surrogate
π 56724 DD94 Γ°Βββ F0 9D 96 94 Low Surrogate
13 55349 D835 High Surrogate
π 56723 DD93 Γ°Βββ F0 9D 96 93 Low Surrogate
14 55349 D835 High Surrogate
π 56729 DD99 Γ°Βββ’ F0 9D 96 99 Low Surrogate
So, these characters are extensions of the 16-bit Unicode set. It's not a different font, but fixed characters in the extended set.
Re: Individual fonts to a file name
Posted: 07 Feb 2025 11:32
by PeterH
Re: Individual fonts to a file name
Posted: 07 Feb 2025 13:41
by PeterH
OK: other view, but fiits here in the moment
XY seems to work well with such characters on fiilenames, text, etc.
But it badly fails with scripting...
Here XY interprets characters as 2-bytes. In real they are UTF-16, i.e *most* used chars can be expressed by 2 bytes, but much seldom used chars are 2*(2Bytes)! And 'πΏ' is one of those...
The "directest" interfaces here are asc() and chr() - both don't understand this. (asc() i.e uses the number modulo x'10000'), chr() seems to only interpret the first 2 bytes.
(OK: there are more problems like substring: 'πΏ' is 1 char, but 2*2bytes - at least it must be defined what happens...)
By the way: the name asc is very out of time: ascii is *only* 7-Bit! 8bit is something like ansi - language-dependent. Unicode is the full representation of 3 bytes (U+0000 - U+10FFFF), WIN-internal is UTF-16.
OK Don - what's to expect with these problems?
EDIT: correct definition of unicode
Re: Individual fonts to a file name
Posted: 07 Feb 2025 15:13
by admin
chr() will work in next beta. The rest after TB.
Re: Individual fonts to a file name
Posted: 07 Feb 2025 22:58
by PeterH
OK: saw your enhancement of chr(): very helpful
Especially that you can directly set the U+nnnn as chr(0xnnnn)! I.e. in this means we don't see the rules of UTF-16!
Now *every* try of asc() on such a "char" must fail - it will interpret the high surrogate as a full character.
As chr() defines that it will work on (only) one char, you could enhance it: test 2 bytes for a high surrogate, and if it is interpret 2*2 bytes (i.e. high and low surrogate) as a char.
1) yes: easy said
2) *can* be wrong -
but not doing it *must* be wrong
I agree: strlen(), substr(), etc should wait...
... as you often said: needs more thinking!
Re: Individual fonts to a file name
Posted: 08 Feb 2025 12:53
by admin
I had to do it, because there were old bugs in asc(). Next beta.

Re: Individual fonts to a file name
Posted: 08 Feb 2025 13:42
by PeterH