Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 23:55 05 Mar 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: 8x8 Font editor written in basic.

Author Message
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 03:00pm 30 Aug 2020
Copy link to clipboard 
Print this post

I've made a font editor in CMM2 basic. It's kind of a mess but I'm a bit sick of working on it, so it is what it is.
Number of characters in the font is hard coded, but you can just change a constant.
Same for filename.
Size is hard coded to 8x8, and probably needs a fair bit of work to change.

font-editor.zip

edited to add: There's also an option to edit in the program to start with an included font file, I included the ZX Spectrum one if you turn on the option.
Edited 2020-08-31 01:02 by capsikin
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 06:05am 13 Sep 2020
Copy link to clipboard 
Print this post

font-editor.zip

New version, you can move the all the pixels in a character up, left, down or right. I used it to align the Sinclair font characters as they didn't match what I saw in an emulator.

It may need a recent version of the firmware as there was a bug in MID$ before 5.05.05

Edited to add attachment
Edited 2020-09-13 16:06 by capsikin
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3782
Posted: 10:51am 14 Sep 2020
Copy link to clipboard 
Print this post

Hi "capiskin",

I took a look and it has the makings of a useful tool, but needs a lot of work

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 227
Posted: 01:34pm 14 Sep 2020
Copy link to clipboard 
Print this post

  thwill said  Hi "capiskin",

I took a look and it has the makings of a useful tool, but needs a lot of work

Best wishes,

Tom


Hi Capiskin


I'd be happy to help out on this project.  I've got a project where I want to create a custom font and whilst FontEdit is excellent I'd have loved to do the work directly on the CMM 2.  DM me if you're interested
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 04:41am 16 Sep 2020
Copy link to clipboard 
Print this post

  elk1984 said  
  thwill said  Hi "capiskin",

I took a look and it has the makings of a useful tool, but needs a lot of work

Best wishes,

Tom


Hi Capiskin


I'd be happy to help out on this project.  I've got a project where I want to create a custom font and whilst FontEdit is excellent I'd have loved to do the work directly on the CMM 2.  DM me if you're interested


Cool, DM sent.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3782
Posted: 09:10am 16 Sep 2020
Copy link to clipboard 
Print this post

Hi "capiskin",

Unfortunately I don't have the time to volunteer to help, but a font editor is on my "hit list" for the Welcome Tape, I don't suppose that is possible ?

You might also want to keep in the back of your mind that the functionality of a simple sprite editor has a reasonable amount in common with a font editor. Two birds with one stone and all that.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 02:18am 20 Sep 2020
Copy link to clipboard 
Print this post

  thwill said  Hi "capiskin",

capsikin
  thwill said  
Unfortunately I don't have the time to volunteer to help, but a font editor is on my "hit list" for the Welcome Tape, I don't suppose that is possible ?

You might also want to keep in the back of your mind that the functionality of a simple sprite editor has a reasonable amount in common with a font editor. Two birds with one stone and all that.

Best wishes,

Tom


If we get it in a good state to go on the tape, I think I'd be okay with the unlicense. I'll check with elk1984. No promises on getting it polished and ready though.
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 02:33am 20 Sep 2020
Copy link to clipboard 
Print this post

Apart from stuff I found via the manual, this is where I got some font format information - TassyJim explained a header line:
https://www.thebackshed.com/forum/ViewTopic.php?TID=12451&PID=151451#151451
In the example 01203C30
Each two hex digits are one number.
"1 character, Chr$(32), 60 pixels high and 48 pixels wide"
01 is number of characters, 1
20 is the hex code for the first character, decimal 32, the space character.
3C hex must be 60 in decimal.
30 hex is 48 in decimal.

Here's a layout I think would look better. (It's similar to the Repton 3 game sprite editor on the BBC Micro)
squarish rbox around the pixel grid in the top left
full width rbox at the bottom, to display the whole character set. may need to  be up to 32 characters wide x 8 high, plus spacing.
top right can be used for other things. e.g. brief instructions.

The current character could have a two pixel box around it. I didn't think of a way to indicate the pixel cursor yet.

I made a mockup of the layout, program here
mode 1
cls
bsize=320
rbox 0,0,bsize,bsize
psize=32
offset=(bsize-(8*psize))/2
for n=0 to 7
 for m=0 to 7
   box n*psize+offset,m*psize+offset,psize,psize,2,RGB(gray),RGB(black)
 next
 box n*psize+offset,n*psize+offset,psize,psize,2,RGB(gray),RGB(white)
next
rbox 0,bsize+16,768,144
print @(bsize+64,0) "Press a key to quit mockup program"
do
loop until inkey$ <> ""
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3782
Posted: 10:11am 20 Sep 2020
Copy link to clipboard 
Print this post

Hi "capsikin",

Mockup looks very pretty.

  Quote  If we get it in a good state to go on the tape, I think I'd be okay with the unlicense. I'll check with elk1984. No promises on getting it polished and ready though.


No worries. Regarding the license, I have in the latest post on the Welcome Tape thread accepted the possibility that some programs will be alternatively licensed ... it shouldn't be too much of a problem, though the more using the Unlicense the better.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
elk1984

Senior Member

Joined: 11/07/2020
Location: United Kingdom
Posts: 227
Posted: 11:23am 20 Sep 2020
Copy link to clipboard 
Print this post

  thwill said  Hi "capsikin",

Mockup looks very pretty.

  Quote  If we get it in a good state to go on the tape, I think I'd be okay with the unlicense. I'll check with elk1984. No promises on getting it polished and ready though.


No worries. Regarding the license, I have in the latest post on the Welcome Tape thread accepted the possibility that some programs will be alternatively licensed ... it shouldn't be too much of a problem, though the more using the Unlicense the better.

Best wishes,

Tom


More than happy for any code I contribute to be published and used as people see fit.  But no warranty eh?  
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024