![]() |
![]() |
#1 |
Registered User
Join Date: Jan 2019
Location: Coimbra / Portugal
Posts: 54
|
Topaz font and diskfont.library
Hi there;
I'm using the PRINT command to write some text into a Bitmap. The only problem is when I boot from floppy without the WB it always ask for the diskfont.library file. There is any way to force it to use the default ROM font Topaz and ending the need of having diskfont.library in the floppy? Thanks. |
![]() |
![]() |
#2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,413
|
Not with the built-in commands, no. The problem is that Blitz will try to open any libraries needed by any used command libraries, so once you use any command from the Print library, regardless of whether you use a ROM font, or even if the command doesn't use a font, Blitz will try to open it. The ways around it would be either to roll your own font drawing routine, or maybe create shapes for each character you want to use and blit them as needed.
|
![]() |
![]() |
#3 |
Registered User
Join Date: Jan 2019
Location: Coimbra / Portugal
Posts: 54
|
Thank you for your nice explanation, Daedalus.
In fact, in a more sophisticated program like a game or demo I use the method of creating shapes for each character. In this case is just a simple control program that reads several values from a port and displays them on the screen. |
![]() |
![]() |
#4 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,413
|
Fair enough. Well unless you were planning on selling the disk, the simplest option is probably to just stick diskfont.library on the disk with the program.
|
![]() |
![]() |
#5 |
Registered User
Join Date: Jan 2019
Location: Coimbra / Portugal
Posts: 54
|
Yeap, it is just for home use
![]() The program itself plus diskfont.library leave about 80% of the disk free, lol! Thanks again and have a nice weekend. |
![]() |
![]() |
#6 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,033
|
I presume you are using an earlier kickstart or later?
|
![]() |
![]() |
#7 |
Registered User
Join Date: Jan 2019
Location: Coimbra / Portugal
Posts: 54
|
I tested on kickstart 1.2, 1.3, 2.04, 2.05, 3.0 and 3.1 and without diskfont.library placed on floppy the program doesn't work.
Last edited by madaxe; 27 October 2022 at 20:26. |
![]() |
![]() |
#8 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
There's also the "FNS" font system as part of the Blitz Support Suite (RIFNSLib), I think it has its own print routines. I can't find any documentation on how to use it though
|
![]() |
![]() |
#9 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,413
|
Yep, the FNS system is excellent. It's fairly straightforward to use, but slightly more involved as you need to use a custom font format. Luckily, there's an editor included in the demo programs drawer that includes a decent font editor, and working example code. I used it for my Blitz Jam submission and once you get past the custom font data bit it's really nice to use.
|
![]() |
![]() |
#10 |
Registered User
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
|
The documentation for this lib is part of the AB3-distribution as a guide file that can be accessed from the IDE by Pressung Shift-help on an instruction or by using the Instruction Browser.
Last edited by Honitos; 02 November 2022 at 08:08. |
![]() |
![]() |
#11 | |
Registered User
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
|
Quote:
I checked the fontlib, it always tries to open topaz.font using the diskfonts library function OpenDiskFont(). I could patch this, but problem is, the startup code opens all libraries, that *may* be needed, the patch would not change anything here. I don't see any problems even if selling a game here. I remember some comercial games that booted to WB and had AmigaOS-components on disk. Otherwise you could not provide any software that boots to WB - you need at least some DOS-Commands to be part of the disk. |
|
![]() |
![]() |
#12 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,413
|
This is something that I looked into before, and OS components distributed on commercial releases are supposed to be licenced. In Commodore days, some of the licences were free (e.g. for including the Installer tool with your software), you just needed that permission. But in more recent times I had this issue with Dodgy Rocks, and Cloanto were asking for a $99 licence fee to include diskfont.library and the Assign command from OS 1.3... Hence it was released without being bootable.
In the past, even if Commodore charged a fee, it's likely that commercial publishers, magazines and so on had these licences in place. |
![]() |
![]() |
#13 |
Registered User
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
|
I am shocked. This is really bad.
|
![]() |
![]() |
#14 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,755
|
Do you specify Topaz anywhere in the program or compile settings? If not, Blitz Basic itself forces it. Which hopefully should also let you specify a custom font. And it's not a bad idea to use a nice font when you make a release.
![]() FastFonts 2.17 will open Topaz without diskfont.library AFAIK, and this will mean it's in memory according diskfont.library, but this might not prevent Blitz Basic from wanting diskfont.library. Worth a try maybe. Tested on 1.3-3.1, not lower. If Blitz Basic can use graphics.library functions, then you can OpenFont() instead of OpenDiskFont(), then SetFont, then CloseFont. Also worth a try maybe. But there would have to be some check in Blitz Basic that prevents it from opening diskfont.library if you already have the font you/it wants. |
![]() |
![]() |
#15 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,413
|
Yeah, diskfont.library is opened by Blitz without any particular font being specified; it's part of the Blitz boilerplate code that's added whenever any text functions are used in the program, so the coder doesn't really have a lot of say in it unfortunately.
|
![]() |
![]() |
#16 |
Registered User
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
|
To complete this thread I want to admit that I patched the fontlib:
If the requested font is in ROM - that is "topaz.font" - it uses OpenFont(). Only if requested font is not in ROM, the lib uses OpenDiskFont() from diskfont.library. So if no other font ist used, diskfont.library is not needed anymore. This change is part of the release of AmiBlitz3 V3.9.9. Last edited by Honitos; 06 September 2023 at 13:40. |
![]() |
![]() |
#17 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,413
|
Excellent work
![]() |
![]() |
![]() |
#18 | |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,130
|
Quote:
|
|
![]() |
![]() |
#19 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,413
|
Hmmm, I think that must have passed me by. I don't think I tried it - I'll check it out for the next time!
|
![]() |
![]() |
#20 |
Registered User
Join Date: Jan 2022
Location: Wales
Posts: 92
|
I'm soon releasing my puzzle game, Spheroid, which is on a booting disk. I've used 'ECHO' in the startup-sequence to print a 'loading' message to an AmigaOS window before the game takes over.
Would including 'ECHO' in my 'c' drawer be subject to possibly similar licensing issues as the 'diskfont.library' as described above? I never really thought about it before... The game is being distributed for free on itch.io, but there will be a 'donation' type button to cover some costs I incurred in resurrecting my real hardware. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Topaz Font - screengrab of various sizes | Blitter | request.Other | 3 | 14 October 2019 03:11 |
No kerning when using diskfont.library | matsp888 | Coders. System | 3 | 07 June 2019 11:57 |
Topaz.font 8x16 | redblade | request.Other | 2 | 26 December 2014 17:06 |
1.3 Topaz font | Anakirob | request.Other | 11 | 04 March 2012 13:27 |
Using a diskfont without diskfont.library, just incbin it! | a4k-oerx | Coders. General | 12 | 18 December 2008 13:16 |
|
|