Author Topic: Textured Fonts  (Read 4143 times)

0 Members and 1 Guest are viewing this topic.

Offline Pot Noodle

  • Sponsor
  • Amiga 1200
  • *******
  • Posts: 271
  • Karma: 15
  • Computers have lots of memory but no imagination
    • View Profile
Textured Fonts
« on: January 06, 2012 »
Anyone got some idea how textured fonts are laid out due to size, as I would like to be able to use different size fonts in my scroll routines like 16x16 32x32 and so on, is there a program that can lay em out for you?
any help appreciated.

 

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: Textured Fonts
« Reply #1 on: January 06, 2012 »
I'm not sure I understand the question properly. Do you want a program that can create bitmap fonts for you or are you looking for some kind of format that bitmap font layouts adhere to?

If you want to make your own bitmap fonts. This is quite widely used and has been for a while: Bitmap Font Builder[url]. I think it's limited to plain coloured fonts but you should be able to jazz up the output in photoshop without too much hassle.

As far as layouts go, they're pretty different between bitmap fonts (in my experience) but a lot use ASCII ordering which helps when parsing.

Sorry if I've misunderstood...
raizor

Challenge Trophies Won:

Offline Pot Noodle

  • Sponsor
  • Amiga 1200
  • *******
  • Posts: 271
  • Karma: 15
  • Computers have lots of memory but no imagination
    • View Profile
Re: Textured Fonts
« Reply #2 on: January 06, 2012 »
Thanks Raizor, I think I have it sorted, shame there is no way of working out the number of frames by the size on the fly

Global Font = LoadAnimImage("sfont16.bmp", 1, 16, 0, 944)

This one had me confused as the width is set to 1 but the fonts are 16x16, would I be right in thinking it is possible to create more frames than there really is? I/e 944

Thanks.
« Last Edit: January 06, 2012 by Pot Noodle »

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Textured Fonts
« Reply #3 on: January 06, 2012 »
I think your after varying font widths.  and this idea should help.

What you can do is design them as the maximum width of the widest letter for example M, and make sure it's rounded to the nearest sizes of, 8x8, 16*16, 32*32 etc etc. And then just place them in your image as a grid of letters per normal, and then in your load anim image routine detect the start and end size per character, perhaps use a mask colour that's unique say 0xff00ff, so your making like a font splitter.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Textured Fonts
« Reply #4 on: January 07, 2012 »
I guess he's making the anim frames 1 pixel wide instead of 16 wide so he can sine scroll his font on a single pixel instead of single letter.  He'd then need to plot 16 one-pixel-wide sprites per letter.

Jim
Challenge Trophies Won:

Offline Pot Noodle

  • Sponsor
  • Amiga 1200
  • *******
  • Posts: 271
  • Karma: 15
  • Computers have lots of memory but no imagination
    • View Profile
Re: Textured Fonts
« Reply #5 on: January 07, 2012 »
Thanks for that info Clyde, I will give it a try and see and Jim your bang on I worked it out by looking at the code
looping from 0 to 15 and drawing every time, that's why the total frames are 944 I'd need a calculator to work that one out  ;D But thanks guys now I have to work out how to read Image Headers in Blitzmax  ^-^
« Last Edit: January 07, 2012 by Pot Noodle »