This project shortens text with an advanced library
And if you want to add your own font... it's kinda difficult.
Here's how you do it:
1. Align the text to the left in
SBPAINT/SBGED (e.g.
MYFONT.FON)
2. Assign the length in
FONTDLL (e.g.
FONTDLL%[ASC("!")]=2)
3. Save the
FONTDLL (e.g.
SAVE"DAT:MYFONT.DLL",FONTDLL%)
Instructions:
How to use in your program:
Just copy the files and put this in your program: (After
ACLS)
DIM FONTDLL%[65536]
LOAD"GRPF:SBMULTI.FON",0
LOAD"DAT:SBMULTI.DLL",FONTDLL%,0
EXEC"PRG1:MFONT.LIB"
P.S. If you want the
MFONT2 library, just replace the
MFONT.LIB with
MFONT2.LIB
Commands:
MFONT TEXT$,X,Y,XI,YI,RGB,FONTDLL%
XI/YI: The edge of X/Y (Basically a box)
FONTDLL: Just put in the
FONTDLL array above
MLEN(TEXT$,FONTDLL%)
This outputs the length of the text with the
FONTDLL
Multifont 2 library:
MFONT2 TEXT$,X,Y,XI,YI,FONTDLL%
Just like
MFONT, but has more features. (The features are in the
TEXT$ string)
%B: Changes the bold feature (e.g.
%B1)
%C: Changes the color (e.g.
%CFFFFFF)
%S: Changes the character spacing (e.g.
%S3)
%X: Changes the width of the text
%Y: Changes the height of the text
%P: Changes the allocated length of a special command (Exept for
%C) (e.g.
%P2%S10)
&: Specifies as an escape character