A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in




log in with SceneID


Demos Amiga Demoscene Archive Forum / Coding / coding tutorial: fonts


Author Message
#1 - Posted: 12 Dec 2004 10:35
Reply Quote
What program do you use to convert fonts to raw? I'm using font2raw, but as default, the conversion string contains only letters and numbers. I want something that converts every character from space to Z and i'm too lazy to type all those characters everytime i want to convert a font.
#2 - Posted: 12 Dec 2004 13:21
Reply Quote
I was using a self written converter that dumped every character to an image of given width and variable height and that gave me a table of coordinates to reach each individual character. That program was written in Basic.
#3 - Posted: 13 Dec 2004 09:12
Reply Quote
I also use my own program written in basic =) It takes a font from an iff image and rearranges the characters and save them as raw. you can have it you want.
#4 - Posted: 23 Dec 2004 13:12
Reply Quote
I use my own program written in Amiga E. Or I just draw the font in PPaint and cut it out in PicCon...
#5 - Posted: 1 May 2007 19:26
Reply Quote
Are there any other font to raw converters besides font2raw (which is generating strange raw files under winuae)?
#6 - Posted: 1 May 2007 20:50
Reply Quote
I always slaved Leunam so that he placed the font characters into columns in ASCII order :)

Later I'd export the columns one after another as raw image and incbin each in order.
#7 - Posted: 13 Jun 2007 20:20
Reply Quote
What I want to say may be it's slightly offtopic, but look to these:
there is some code cutting font directly from its bitmap formed by system when opening font.

Also check lpstop 4k where it is with sources, although I can't find link to it ATM. There is similar font 'cutting' code.
#8 - Posted: 19 Jun 2007 12:55 - Edited
Reply Quote
Is there a font to chunky converter?

If not, what are the most common techniques to use fonts on a chunky screen.
#9 - Posted: 19 Jun 2007 17:59 - Edited
Reply Quote
easy, convert your font to chunky like this:

lea font,a0
lea chunkyfont,a1
moveq #8-1,d7 ; font height
move.b (a0)+,d0 ; font data (planar)
move.b #8-1,d6 ; bit counter
add.b d0,d0
bcc.b .nopixel
st.b (a1) ; write chunky pixel
addq.w #1,a1
dbf d6,.bitloop
dbf d7,.fontloop

this is not optimized at all but should be easy to understand I hope. :)

Edit: What you have to do is the follwing: read one line of your planar char (move.b for 8 pixel font, move.w for 16 pixel font etc.) and then test all the bits in that byte. this is what the add.b d0,d0 does, if the bit was set, the carry flag will be set. if the bit was set, you have to draw a pixel in your chunkybuffer. that's all. :)


  Please register a new account or log in to comment





A.D.A. Amiga Demoscene Archive, Version 3.0