English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 26 October 2022, 18:44   #1
madaxe
Registered User
 
madaxe's Avatar
 
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.
madaxe is offline  
Old 26 October 2022, 22:07   #2
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,352
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.
Daedalus is offline  
Old 27 October 2022, 15:04   #3
madaxe
Registered User
 
madaxe's Avatar
 
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.
madaxe is offline  
Old 27 October 2022, 15:39   #4
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,352
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.
Daedalus is offline  
Old 27 October 2022, 18:44   #5
madaxe
Registered User
 
madaxe's Avatar
 
Join Date: Jan 2019
Location: Coimbra / Portugal
Posts: 54
Yeap, it is just for home use No problem to copy diskfont.library to floppy.
The program itself plus diskfont.library leave about 80% of the disk free, lol!
Thanks again and have a nice weekend.
madaxe is offline  
Old 27 October 2022, 18:56   #6
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,011
I presume you are using an earlier kickstart or later?
Galahad/FLT is offline  
Old 27 October 2022, 20:16   #7
madaxe
Registered User
 
madaxe's Avatar
 
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.
madaxe is offline  
Old 01 November 2022, 17:51   #8
E-Penguin
Banana
 
E-Penguin's Avatar
 
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,214
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
E-Penguin is offline  
Old 01 November 2022, 19:22   #9
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,352
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.
Daedalus is offline  
Old 01 November 2022, 22:30   #10
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
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.
Honitos is offline  
Old 02 November 2022, 09:08   #11
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
Quote:
Originally Posted by madaxe View Post
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.

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.
Honitos is offline  
Old 02 November 2022, 14:38   #12
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,352
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.
Daedalus is offline  
Old 02 November 2022, 22:30   #13
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
I am shocked. This is really bad.
Honitos is offline  
Old 18 June 2023, 14:13   #14
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,615
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.
Photon is offline  
Old 18 June 2023, 21:04   #15
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,352
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.
Daedalus is offline  
Old 06 September 2023, 10:21   #16
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
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.
Honitos is offline  
Old 06 September 2023, 10:31   #17
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,352
Excellent work
Daedalus is offline  
Old 06 September 2023, 12:52   #18
redblade
Zone Friend
 
redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
Quote:
Originally Posted by Daedalus View Post
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.
Is the ARP (AmigaDOS Replacement Project) not good enough to use as a 'assign' replacement?
redblade is offline  
Old 06 September 2023, 13:55   #19
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,352
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!
Daedalus is offline  
Old 26 October 2023, 10:16   #20
aNdy/AL/COS
Registered User
 
aNdy/AL/COS's Avatar
 
Join Date: Jan 2022
Location: Wales
Posts: 91
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.
aNdy/AL/COS is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:23.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.13379 seconds with 16 queries