17 February 2017, 14:03 | #1 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,561
|
Bitmap font library?
Can anyone recommend a good Blitz Basic bitmap font library? I'm after something with the following features:
- Supports the font graphics being in an IFF - Supports proportional width with the character dimensions being in a data file (height would be a bonus but not totally necessary) I'm currently using FNS, which would be fine other than we need to support fonts with multiple colors. Thanks in advance. |
17 February 2017, 19:05 | #2 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,381
|
I was just going to recommend FNS.
The only font libraries supported by Blitz are the built-in one, OS calls and FNS. When using a custom colour font, I've just made it into a series of shapes and used the chr$ of the string as an offset into the shapes table. |
21 February 2017, 04:48 | #3 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,561
|
Cheers, I'll whip something up along those lines.
|
06 September 2017, 14:03 | #4 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Old thread I know but FNS looks interesting. Is it possible to create your own fonts for that library and does anybody have an example how to use the library?
Last edited by MickGyver; 06 September 2017 at 21:13. |
06 September 2017, 17:57 | #5 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,381
|
Check BUM 09. It contains both example code and an editor for FNS fonts.
|
06 September 2017, 21:07 | #6 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
|
15 January 2021, 15:29 | #7 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
|
15 January 2021, 16:14 | #8 | |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,908
|
Quote:
Using shapes is possibly the most flexible option but you have sort out your own routine for printing to the screen. You can of course use sprites - I did in my Flappy Bird game - and this has the added advantage of being able to print freely over scrolling backgrounds or moving objects. I have yet to find a multiplexer in Blitz that works as well as I would like but Earok has one he wrote so maybe that will do what he wants? I think in theory, if you multiplex sprites you can have a status bar/score/text out of sprites and still have sprites for your game but not sure the Amiga hardware is really up to this as not many games do it (or maybe it's just too complicated)? |
|
15 January 2021, 16:16 | #9 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
|
15 January 2021, 20:22 | #10 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,908
|
|
16 January 2021, 18:10 | #11 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,381
|
Sorry, that should have been Asc() values. Just use Asc(Mid$(your_text$,offset,1)) to get the ASCII value of a letter in your text and use that as the Shape number, optionally offsetting it to some other base number using subtraction.
It’s preinstalled if you use Ultimate Blitz CD, otherwise it’s on one of the BUMs. |
18 March 2021, 16:07 | #12 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
Quote:
Now the problem is: how do you convert an IFF file to FNS? Or am I missing something here? I do not want to have to edit all fonts one by one again, I have them as bitmaps. |
|
19 March 2021, 10:37 | #13 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
I don't know what Fns is but in my project I just implemented it myself. It's really not that hard as it seams. I just copied letters as shapes.
I use normal strings like mytxt$="abcdefghi" and then access the letters in the loop and bit them on the screen: i=0 letter.b = peek.b(&mytxt$+i) block base+letter,...... it works well and I have full control over it and no mess with additional libs |
23 March 2021, 17:33 | #14 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
I went and made a parser myself too, similar to what idrougge did. Now I can even have color fonts.
Seriously, I find myself, most times, just making my own shit instead of using what comes with Blitz. Kinda lame |
29 May 2024, 15:14 | #15 |
Registered User
Join Date: Apr 2008
Location: France
Age: 42
Posts: 475
|
Hi ! Late to the party
What's the optimal way in terms of performance ? Maybe FNS is written in asm ? EDIT : BTW, gave FNS a try and compiled the demos. I used the big "deflibs"' from the extras of the Ultimate Blitz CD. Is that overkill ? Would have preferably just added this single RI library as I guess it adds many other user libraries in the process ? Last edited by mahen; 30 May 2024 at 09:20. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bitmap... "shaking" when blitting shapes on it - Also problems with Display Library | Shatterhand | Coders. Blitz Basic | 18 | 20 June 2016 19:26 |
Looking to convert bitmap - amiga font | leathered | request.Apps | 2 | 02 May 2014 01:11 |
HELP: Opus5, KingCON, SysInfo.library (Sysmon.library) triangle | Michael | support.Apps | 6 | 10 March 2014 14:08 |
Bitmap Font File Structure | ant512 | Coders. General | 7 | 20 October 2007 08:33 |
Making a shared library from a gcc .a library | JoJo | Coders. General | 1 | 10 March 2003 19:06 |
|
|