Page 1 of 1

How do you change text size in basic?

Posted: Sun Feb 13, 2022 6:26 am
by Lostboys
Hi
I have searched the web and this forum, but can’t find anything on creating larger text in basic, how do I do it?
Thank you

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 8:46 am
by Sokurah
There is no automatic function to do this. If you need bigger text you'd have to code something that generates it ... and unless you do that in assembler it'll probably be too slow.

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 8:48 am
by Lostboys
That explains why I can’t find any tutorials in creating larger text :)

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 9:17 am
by equinox
Consider using Andy Pennell's Print Utilities:
https://spectrumcomputing.co.uk/entry/8 ... _Utilities

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 9:21 am
by R-Tape
Lostboys wrote: Sun Feb 13, 2022 8:48 am That explains why I can’t find any tutorials in creating larger text :)
There are plenty of utilities for fonts of all shapes and sizes in BASIC. If you search the archive for Genre = "Utility: Fonts/UDGs" you'll see a bewilderment of choice! Here are a few from that list:

Small fonts:
https://spectrumcomputing.co.uk/entry/1 ... e_Printing (but you need to download it from this compilation - side B)

Fonts big and small:
https://spectrumcomputing.co.uk/entry/1 ... m/Bigprint (but you need to download it from this compilation) - side A.

For proportional fonts:
https://spectrumcomputing.co.uk/entry/2 ... ectrum/FZX

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 9:26 am
by Lostboys
equinox wrote: Sun Feb 13, 2022 9:17 am Consider using Andy Pennell's Print Utilities:
https://spectrumcomputing.co.uk/entry/8 ... _Utilities
Thank for this, I will get the tape.

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 1:04 pm
by hikoki

Code: Select all

10 FOR f=0 TO 7
20 POKE 23681,64+f
30 LPRINT "HELLO"
40 NEXT f
50 REM change 64 downto 60 for effect
60 REM change 64 to 72 middle
70 REM change 64 to 80 lower part
80 REM https://www.worldofspectrum.org/forums/discussion/comment/914785/#Comment_914785
90 REM https://www.worldofspectrum.org/forums/discussion/comment/825202/#Comment_825202

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 1:05 pm
by hikoki

Code: Select all

10 FOR F=64 TO 71: POKE 23681,F: LPRINT "NICE EFFECT": NEXT F
20 FOR F=72 TO 79: POKE 23681,F: LPRINT "  OF THE  ": NEXT F
30 FOR F=80 TO 87: POKE 23681,F: LPRINT "PRINTERBUFFER": NEXT F
40 REM https://www.worldofspectrum.org/forums/discussion/comment/9747/#Comment_9747

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 1:29 pm
by WhatHoSnorkers
Horizons "Thro The Wall" uses a machine code utility to do it. But otherwise, in BASIC, you can't.

The machine code utility looks like it takes a string P$ and some POKEd values, and then calls a routine.

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 1:51 pm
by TMD2003
CSIZE 0,0 for regular text, CSIZE 2,0 for double-width, CSIZE 2,1 for double-height as well... oh, wait, no, that's the QL. And the SAM Coupé had something similar.

But never fear! 40 Best Machine Code Routines for the ZX Spectrum has "Screen Magnify and Copy" on page 77. It's slow, given that it's machine code, but I've used it to useful effect in the Spectrum conversion of Big Clive's Supergayrainbow Exploding USB Power Supply Game to generate the round titles.

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 2:16 pm
by Lostboys
hikoki wrote: Sun Feb 13, 2022 1:05 pm

Code: Select all

10 FOR F=64 TO 71: POKE 23681,F: LPRINT "NICE EFFECT": NEXT F
20 FOR F=72 TO 79: POKE 23681,F: LPRINT "  OF THE  ": NEXT F
30 FOR F=80 TO 87: POKE 23681,F: LPRINT "PRINTERBUFFER": NEXT F
40 REM https://www.worldofspectrum.org/forums/discussion/comment/9747/#Comment_9747
Thank you for these snippets

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 2:17 pm
by Lostboys
Thank you, I will have a look.

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 2:18 pm
by Lostboys
TMD2003 wrote: Sun Feb 13, 2022 1:51 pm CSIZE 0,0 for regular text, CSIZE 2,0 for double-width, CSIZE 2,1 for double-height as well... oh, wait, no, that's the QL. And the SAM Coupé had something similar.

But never fear! 40 Best Machine Code Routines for the ZX Spectrum has "Screen Magnify and Copy" on page 77. It's slow, given that it's machine code, but I've used it to useful effect in the Spectrum conversion of Big Clive's Supergayrainbow Exploding USB Power Supply Game to generate the round titles.
Thank you I will have a look.

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 2:36 pm
by TMD2003
I had all the routines typed in and saved, and have probably lost them on a hard disc that went a bit mad (and was only partially recovered). I really should get round to typing them in again.

Any routine in that book that says "it's not relocatable" - it is if you have an assembler, the book assumed that anyone using these routines was typing them in as a string of numbers. "Not relocatable" will include a CALL or (less likely) a JP in there somewhere.

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 3:30 pm
by ZXDunny
TMD2003 wrote: Sun Feb 13, 2022 1:51 pmCSIZE 0,0 for regular text, CSIZE 2,0 for double-width, CSIZE 2,1 for double-height as well... oh, wait, no, that's the QL. And the SAM Coupé had something similar.
SpecBAS also allows fractional zooms with the SCALE command, which can be embedded in PRINT statements the same way INK can;

10 PRINT SCALE 3,3;"HELLO"

for example. Assuming you want to do your Sinclair BASIC on a PC that is.

Re: How do you change text size in basic?

Posted: Sun Feb 13, 2022 3:32 pm
by Lostboys
ZXDunny wrote: Sun Feb 13, 2022 3:30 pm
TMD2003 wrote: Sun Feb 13, 2022 1:51 pmCSIZE 0,0 for regular text, CSIZE 2,0 for double-width, CSIZE 2,1 for double-height as well... oh, wait, no, that's the QL. And the SAM Coupé had something similar.
SpecBAS also allows fractional zooms with the SCALE command, which can be embedded in PRINT statements the same way INK can;

10 PRINT SCALE 3,3;"HELLO"

for example. Assuming you want to do your Sinclair BASIC on a PC that is.
No this is on my spectrum.