BBC BASIC Fonts
Norman (1860) 29 posts |
Anyone know the syntax for altering the Font size displayed when i run a program? When I run it the text seems to be minute? |
Martin Avison (27) 1494 posts |
Depends on how you are displaying text! Is it a Wimp program? Is it just using PRINT statements in a Task Window, or in the default graphics window (white, centre screen). What screen resolution are you using? Many Basic programs use outline fonts, which can be at any font and size you like! But it is not a simple PRINT text. |
Norman (1860) 29 posts |
I created a simple program with !Edit which just had a couple of PRINT statements printing a little text and some variable values. I saved it and double clicked it to display the results. Can’t remember exact resolution but fairly high. The on screen text was tiny and my eyesight is not so good now. |
Martin Bazley (331) 379 posts |
I don’t think it can be done for standard text, except by changing into a lower resolution screen mode (which modern monitors are unlikely to support). If you don’t mind a bit of extra overhead, you could research VDU commands – specifically VDU 5 and VDU 23,17. Or you could use OS_Font. Neither solution is particularly nice to work with compared to ordinary PRINTing, though. |
Rick Murray (539) 13840 posts |
As Martin says, standard VDU text is “bitmapped”. That means it is built of a collection of pixels. Something like 8×8, I forget, and the more pixels resolution your screen mode offers, the smaller the text will be. At Full HD, you will have something like 240 characters across and 90 down. OPTION ONE If you just want some readable text for printing some stuff for debugging (you mention printing variables), try changing to MODE 28 before printing. That may, or may not, have any effect (depends upon your hardware and monitor definition). OPTION TWO Press Ctrl and F12 and run your program in a taskwindow. |
Steve Pampling (1551) 8170 posts |
Would the following help? GraphTask |
Neil Fazakerley (464) 124 posts |
As Rick says, Just make |
Martin Avison (27) 1494 posts |
There are other advantages of running a single-tasking program in a TaskWindow, because it allows you to see the output of your program, and also see and use the rest of the desktop at the same time. [plug mode] |
Norman (1860) 29 posts |
My Monitor is a Sony SDM-E96D 17" and it has a DVI input which is what I am using. It’s not on the list of known monitors but it does work at a high resolution of 1920×1200 and 16 million colours and a frame rate of 61Hz, which I obtained by selecting the Sony SDM-P232W. @Steve, At present I don’t think it will help, although if I can get to the stage where it’s practical to type in programs and see the results it’s worth looking at. Text is minute @Neil and Rick, If I select MODE 28 it switches the whole screen to 16 colours and 640×480 which does not return to normal after closing the program. I have to go back to /configure/screen, change from my monitor to something else, discard the changes and go back to the Sony settings or reboot to get back to normal. @Martin Avison, If I run the program in a TaskWindow the text is very small at a guess I would say it equates to a font size of 6 or 7 in bitstream Vera sans in LibreOffice Writer @Martin Bazley, When I get time i’ll try your suggestions, thanks. I tried to post this from my Pi but netsurf crashed while I was typing it :-( |
Martin Avison (27) 1494 posts |
If you run a Basic program with MODE 28 as the first line, then it will change the whole screen to that mode. When the program ends you should get a line ‘Press SPACE or click mouse to continue’ and when you do, it should just return to the desktop. |
Fred Graute (114) 645 posts |
You should be able to change the font used for the TaskWindow to an outline font and then configure a suitable size. All editors that support TaskWindows (on a RPi) will allow you to do this. |
Norman (1860) 29 posts |
@ Martin Avison, It goes straight to the very low resolution as soon as I run the program, I can read the text easily and by comparison the text looks more like a font size of 32 and yes it does give the Space or mouse message and it does return to the desktop but it doesn’t return to the normal resolution it stays at very low resolution. @Fred Graute Thanks, as you can probably tell I am very new to riscos ( but not computing ) so I will try that next time I boot my Pi. |
Norman (1860) 29 posts |
@DavidS I tried the code you posted but it said Screen mode not available at line 60. So I added 15 PRINT OldMode% and got a value of -79645552 so it’s not a surprise it didn’t know that mode. @Fred Gaute that worked great thanks. |
Chris Johnson (125) 825 posts |
Yes. It insists on converting spaces (ascii 32) into hard spaces (ascii 160). |
Norman (1860) 29 posts |
Yes the code I originally tried was precisely as you asked me to try. I have created a new version as I had added extra PRINT statements and it still will not return to the original resolution. |
Michael Drake (88) 336 posts |
Not in development builds for the last few months. |
Chris Johnson (125) 825 posts |
I stand corrected. Sorry about that, I don’t think I have needed to extract any Basic code from a web page for a while now. |
nemo (145) 2546 posts |
Martin suggested:
<panto>Oh yes it is</panto>… well, it can be. Not well documented these days, but PLOT&D8 and VDU23,25/26 are your friends. |
Steve Drain (222) 1620 posts |
Not documented at all AFAICT. The PRM acknowleges their existence for RISC OS 2 compatibility, but says you must not use them. Could you give a reference? |
Norman (1860) 29 posts |
Well I have tried my TV and it’s a failure :-( |
David Gee (1833) 268 posts |
Just remember, you can’t use MODE commands in a task window. |
nemo (145) 2546 posts |
Unless you’re using a Task Window host which does support mode changes. What you meant is you can’t use MODE commands inside a text editor. |
David J. Ruck (33) 1635 posts |
If you have a non-WIMP program, you could try running it in my graphical taskwindow application !GraphTask This has a handy zoom feature, as an BBC BASIC program running at 320×256 in a window can get a bit lost on a 2048×1536 desktop, and we really want to see those chunky old pixels! |
David J. Ruck (33) 1635 posts |
P.S. !GraspTask supports numbered modes and VDU19 colour switching. |
David Gee (1833) 268 posts |
And so far as I can tell, it’s the only way on a Pi of getting the old BBC modes to work ‘correctly’ — by default on a Pi (for example) MODE 1 is the same as MODE 13. |