12-27-2024, 04:55 PM
although this is much larger than the "10 PRINT" program from commodore 64...
it's impossible to create the "x" sigil so it matches well with the other shapes at top and bottom. and also has both smooth diagonals. it requires _PRINTMODE line, i wish it didn't. on the other hand, i was able to remove "x" sigil from reasoning and use both slant sigils to create it instead. the picture looks better this way. at least i'm glad _UPRINTSTRING could print what is seen in gucharmap. with option enabled: "view/show only glyphs from this font".
this program should work on linux. but requires installing font which is easy for user. just copy using your file manager, it doesn't need "superuser" privilege. this "cousine mono" font is easy to get, it is an alternative to "liberation mono" which doesn't have saxophone-looking lowercase L. there are other "nerd" fonts too.
https://github.com/ryanoasis/nerd-fonts
i'm sorry but i don't know what to tell you on windows. install in user directory but where? install in "C:\windows\fonts" but the o.s. might not like it if you don't like it. anyway only the full path with _LOADFONT needs to be changed.
i had to start a new topic, because i cannot find the old topic. probably it was in one of the restricted forums. but the "10 PRINT" program picture interested me. there are many ways to create something like it. but it's amazing with only two glyphs used.
Code: (Select All)
DIM AS INTEGER u1, u2, j, ps, wd, ht, x, y, xm, ym
DIM AS LONG mfont
RANDOMIZE VAL(RIGHT$(TIME$, 2))
ps = 20
xm = ps \ 2
ym = ps
wd = 640
ht = 400
SCREEN _NEWIMAGE(wd, ht, 32)
mfont = _LOADFONT(ENVIRON$("HOME") + "/.local/share/fonts/CousineNerdFontMono-Regular.ttf", ps, "UNICODE")
_FONT mfont
_PRINTMODE _KEEPBACKGROUND
FOR j = 1 TO 1600
u1 = &H25
u2 = INT(RND * 3) + &H71
IF u2 <> &H72 THEN
_UPRINTSTRING (x, y), CHR$(&H71) + CHR$(u1), ps, 16
END IF
IF u2 <> &H71 THEN
_UPRINTSTRING (x, y), CHR$(&H72) + CHR$(u1), ps, 16
END IF
x = x + xm
IF x >= wd THEN
x = 0
y = y + ym
IF y >= ht THEN EXIT FOR
END IF
NEXT
SLEEP
SYSTEM
it's impossible to create the "x" sigil so it matches well with the other shapes at top and bottom. and also has both smooth diagonals. it requires _PRINTMODE line, i wish it didn't. on the other hand, i was able to remove "x" sigil from reasoning and use both slant sigils to create it instead. the picture looks better this way. at least i'm glad _UPRINTSTRING could print what is seen in gucharmap. with option enabled: "view/show only glyphs from this font".
this program should work on linux. but requires installing font which is easy for user. just copy using your file manager, it doesn't need "superuser" privilege. this "cousine mono" font is easy to get, it is an alternative to "liberation mono" which doesn't have saxophone-looking lowercase L. there are other "nerd" fonts too.
https://github.com/ryanoasis/nerd-fonts
i'm sorry but i don't know what to tell you on windows. install in user directory but where? install in "C:\windows\fonts" but the o.s. might not like it if you don't like it. anyway only the full path with _LOADFONT needs to be changed.
i had to start a new topic, because i cannot find the old topic. probably it was in one of the restricted forums. but the "10 PRINT" program picture interested me. there are many ways to create something like it. but it's amazing with only two glyphs used.