GLBasic forum

Main forum => GLBasic - en => Topic started by: Hatonastick on 2009-Aug-06

Title: Another question about the font tool.
Post by: Hatonastick on 2009-Aug-06
I'm currently writing a sort of ANSI-like library (not simulator though) so I can start work on some Rogue-like games that I want to do without resorting to a C compiler and PDCurses.  I'm going the normal GLB route since I like the fact that I can then compile the games for any of the GLB supported systems without resorting to an external library by using something I wrote for my now defunct MUD -- it had a front-end that (at a very simple level) simulated an Amstrad CPC screen where you could type, hit enter etc. and have it act the way it should.  Um, but this of course isn't my question. :)

I've always wondered what the yellow and blue squares in the font files were for and whether you could access via CHR$() any of the ASCII characters of that range (0-31 I think it is from memory).  According to my test you can, so is there a way to get the font tool to add the ASCII character range of 1-31 (not worried about 0 of course) to the bitmap it outputs instead of yellow and blue blocks?  Or am I going to have to resort to a paint program?

Sorry if I'm adding to your workload Gernot, no rush if this would require a change to the font tool.  I can do it by hand if I have to.
Title: Re: Another question about the font tool.
Post by: Moru on 2009-Aug-06
Those yellow and blue blocks are characters that isn't printable in ascii, they all have a function. For example #7 is the system beep, #9 is a tab, #10 is a line feed and #13 is a carriage return. In some fonts they have inserted some special bitmaps for these characters though but now we have colourful sprites to play with instead :-)
Title: Re: Another question about the font tool.
Post by: Kitty Hello on 2009-Aug-06
Yes, you can print them with chr$, but the font tool just makes you a checkerboard template, so you know where to draw what with mspaint.

Would be a nice option to pick some symbols from a different font for that...
Title: Re: Another question about the font tool.
Post by: Hatonastick on 2009-Aug-06
Hmm that gives me an idea Gernot.  Thanks.  Should solve my problem.  Not going to use ANSI for my Rogue-likes after all.  Was proving to be too much of a pain anyway as I'd hoped to simulate the colour side of things too.  Going to go the 'retro graphic' route instead as I don't want to switch to C and PDCurses as I want to use GLB only.  I suspect most people would prefer graphics (even simple ones) to ANSI/ASCII text these days anyway.

BTW what is the maximum number of fonts you can you load and use using LOADFONT and SETFONT?
Title: Re: Another question about the font tool.
Post by: Kitty Hello on 2009-Aug-07
Max font is 32.