Author Topic: Modify the font appearance  (Read 2918 times)

0 Members and 1 Guest are viewing this topic.

Offline belzebu

  • CPC464
  • **
  • Posts: 18
  • Country: it
  • run"a_dream
    • rymstudio
  • Liked: 2
  • Likes Given: 0
Modify the font appearance
« on: 16:30, 25 March 11 »
Hi guys
How i can change the appearance for the font ?!
Long time ago when I was a kid i do it with symbol command from the Basic.
Exist a most powerfull and easy method to do this !?

Another question, anyone remember a little program in to the CPC 464/6128 manual for enter a word and display it with enlarge "font" in graphic mode !?

Thanks to all and excuse me for my newbie question... But i m a donkey in the fog :)

Bye
Belzy

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2274
  • Likes Given: 3478
Re: Modify the font appearance
« Reply #1 on: 16:48, 25 March 11 »
Hi guys
How i can change the appearance for the font ?!
Long time ago when I was a kid i do it with symbol command from the Basic.
Exist a most powerfull and easy method to do this !?

Another question, anyone remember a little program in to the CPC 464/6128 manual for enter a word and display it with enlarge "font" in graphic mode !?

Thanks to all and excuse me for my newbie question... But i m a donkey in the fog :)

Bye
Belzy
First you need to tell BASIC which symbols you want to define with:

SYMBOL AFTER <number>

e.g.

SYMBOL AFTER 128

this will tell it to reserve some ram for the pixel data for the symbols.

then you can enter in basic the symbol command

SYMBOL <number>,<line1>,<line2>,<line3>,<line4>,<line5>,<line6>,<line7>,<line8>

and do this for each symbol you want to define.
<number> is the number of the symbol.
<line1> etc is a number, decimal, hex or binary to define the pixels of each line of the char.

OR another way.

If you have the font data stored as a binary file you can do this:

SYMBOL AFTER <number>
LOAD"<font>",HIMEM-((256-number)* 8)

and that should load the data without needing to define the symbols.

But how to get the binary file?

You can define the font the old way and save it.

SAVE"<font>",b,HIMEM-((256-number)* 8) , (256-number)*8

or perhaps you can take a font that is already made.

There may also be tools to make fonts this way, but I don't know of these. (I hope somebody else can help me).


EDIT: Please also read the BASIC tips forum post, this may help you ;)
http://cpcwiki.eu/forum/index.php/topic,203.0.html
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline EgoTrip

  • 6128 Plus
  • ******
  • Posts: 1.051
  • Country: gl
    • http://egochip.blogspot.co.uk/
  • Liked: 677
  • Likes Given: 294
Re: Modify the font appearance
« Reply #2 on: 16:57, 25 March 11 »
Not sure if this is what you mean but try these for different fonts:


Prog 1:


1 REM Taken from Amstrad Action
10 SYMBOL AFTER 1: FOR t=HIMEM TO HIMEM+(8*255)
20 POKE t,peek(t) XOR 255:NEXT


Change the formula in line 20 for different effects, such as XOR 254, XOR 15


You can do stuff like this too on line 20:


20 FOR s=t TO t+3:POKE s,PEEK(s) XOR 255:NEXT s,t


So just experiment for different effects. If you get a garbled font to reset it just type SYMBOL AFTER 1


Another font program:


10 SYMBOL AFTER 32:FOR a=HIMEM to HIMEM+767 STEP 8
20 FOR b=1 to 4:a$=BIN$(PEEK(a+b),8)
30 POKE a+b,val("&X"+a$)/2:NEXT b,a


As for the large text, one technique is by drawing a character out of sight (best done by setting all the inks to the same colour) then TEST'ing it and then printing blocks or PLOT'ing dots where you want, although this method can be slow. I dont have an example immediately to hand but I can dig one out.
EgoTrip&#39;s Stuff
EgoTrip's Stuff

Online Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.967
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3426
  • Likes Given: 6155
Re: Modify the font appearance
« Reply #3 on: 19:58, 25 March 11 »
A more interesting question, since this one is well documented: how do you change the font in the ROM, like Flynn (WinCPC) has done?

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1016
  • Likes Given: 926
Re: Modify the font appearance
« Reply #4 on: 20:32, 25 March 11 »
Simple. Just store your new font as binary (above himem) and then exchange it to rom's binary. (I actually forgot where its located but the font in rom is the last bytes... 256*8 length? I really forgot)

I did the same with my "C64-ROMs" ;)
I just also changed the palette and the BASIC rom (Ready to READY). That's it.

Make sure you use an "Amstrad" CPC 6128 (No Schneider, Awa or whatever)
« Last Edit: 20:37, 25 March 11 by Devilmarkus »
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.893
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1871
Re: Modify the font appearance
« Reply #5 on: 00:47, 26 March 11 »
Can't say I remember the program from the Manual which enlarged a word, though AA had a number of them, some in BASIC, one I recall being done in Assembly (BIGPRINT - AA57), you should check out "Fast Basic Double-Height" from AA16 which is pretty impressive if you want Double-Height Text as it's quite fast (pretty much straight out of the blocks). ACU I think had a few 10-Liners of that nature too (Height - Nov '90 being one which will be on ACU90B.ZIP file), from memory I think it was a pretty standard program.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline belzebu

  • CPC464
  • **
  • Posts: 18
  • Country: it
  • run"a_dream
    • rymstudio
  • Liked: 2
  • Likes Given: 0
Re: Modify the font appearance
« Reply #6 on: 14:01, 26 March 11 »
WOW! Thanks for all suggestions! Really Really interesting!!!
Thanks to all, thankyou CP/M User i  found what I was looking!!!
Not easy to implement but i m happy :) :) :)



Offline milamber

  • CPC464
  • **
  • Posts: 32
  • Country: gb
  • Long live the CPC!
  • Liked: 0
  • Likes Given: 0
Re: Modify the font appearance
« Reply #7 on: 17:58, 30 April 11 »
Play around with these two POKEs.

a=201

poke &b72f, a ( for different effects change the value of `a` )
poke &b730, a ( changes the paper and can make the text hard to read )