How do you change text size in basic?

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
Lostboys
Drutt
Posts: 15
Joined: Wed Feb 09, 2022 7:12 am

How do you change text size in basic?

Post 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
User avatar
Sokurah
Manic Miner
Posts: 288
Joined: Tue Nov 14, 2017 10:38 am
Contact:

Re: How do you change text size in basic?

Post 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.
Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation & Sqij.
Twitter: Sokurah
Lostboys
Drutt
Posts: 15
Joined: Wed Feb 09, 2022 7:12 am

Re: How do you change text size in basic?

Post by Lostboys »

That explains why I can’t find any tutorials in creating larger text :)
equinox
Dynamite Dan
Posts: 1079
Joined: Mon Oct 08, 2018 1:57 am
Location: SE England

Re: How do you change text size in basic?

Post by equinox »

Consider using Andy Pennell's Print Utilities:
https://spectrumcomputing.co.uk/entry/8 ... _Utilities
User avatar
R-Tape
Site Admin
Posts: 6481
Joined: Thu Nov 09, 2017 11:46 am

Re: How do you change text size in basic?

Post 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
Lostboys
Drutt
Posts: 15
Joined: Wed Feb 09, 2022 7:12 am

Re: How do you change text size in basic?

Post 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.
hikoki
Manic Miner
Posts: 585
Joined: Thu Nov 16, 2017 10:54 am

Re: How do you change text size in basic?

Post 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
hikoki
Manic Miner
Posts: 585
Joined: Thu Nov 16, 2017 10:54 am

Re: How do you change text size in basic?

Post 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
User avatar
WhatHoSnorkers
Manic Miner
Posts: 255
Joined: Tue Dec 10, 2019 3:22 pm

Re: How do you change text size in basic?

Post 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.
I have a little YouTube channel of nonsense
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
User avatar
TMD2003
Rick Dangerous
Posts: 2047
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: How do you change text size in basic?

Post 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.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Lostboys
Drutt
Posts: 15
Joined: Wed Feb 09, 2022 7:12 am

Re: How do you change text size in basic?

Post 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
Lostboys
Drutt
Posts: 15
Joined: Wed Feb 09, 2022 7:12 am

Re: How do you change text size in basic?

Post by Lostboys »

Thank you, I will have a look.
Last edited by Lostboys on Sun Feb 13, 2022 2:19 pm, edited 1 time in total.
Lostboys
Drutt
Posts: 15
Joined: Wed Feb 09, 2022 7:12 am

Re: How do you change text size in basic?

Post 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.
User avatar
TMD2003
Rick Dangerous
Posts: 2047
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: How do you change text size in basic?

Post 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.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
ZXDunny
Manic Miner
Posts: 503
Joined: Tue Nov 14, 2017 3:45 pm

Re: How do you change text size in basic?

Post 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.
Lostboys
Drutt
Posts: 15
Joined: Wed Feb 09, 2022 7:12 am

Re: How do you change text size in basic?

Post 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.
Post Reply