Preloading fonts and cross platform compatibility

Find quick help here to get you started with Hollywood
Post Reply
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

Preloading fonts and cross platform compatibility

Post by amyren »

Many of my programs compiled for 68k runs quite well on AmigaOS4 and MorphOS. And MorphOS usually runs warpOS compiled programs as well.

But if I add a preloaded font to the Hollywood program, the 68k / WarpOS version will fail on MorphOS, complaining about the missing font.

The solution is of course to compile a separate binary for each system.
But it still makes me worder what is different in the way these systems handles fonts, and how Hollywood handles the linked/preloaded font?
User avatar
Juan Carlos
Posts: 889
Joined: Mon Sep 06, 2010 1:02 pm

Re: Preloading fonts and cross platform compatibility

Post by Juan Carlos »

You don't forget that version uses its own plugins, you can't use the Amiga68k under MorphOS with the plugins of this system installed, 68k doesn't work. Every executable with the plugins of its system.
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

Re: Preloading fonts and cross platform compatibility

Post by amyren »

No plugins is used, only the use of font was changed.
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Preloading fonts and cross platform compatibility

Post by airsoftsoftwair »

What kind of font do you preload? Amiga bitmap font or TrueType font? Can you post the preprocessor line used for preloading?
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

Re: Preloading fonts and cross platform compatibility

Post by amyren »

airsoftsoftwair wrote: Sun Feb 16, 2020 12:01 am What kind of font do you preload? Amiga bitmap font or TrueType font? Can you post the preprocessor line used for preloading?
It is a TrueType font, and I use this line to preload the font

Code: Select all

@FONT 1, "DS-DIGITAL BOLD ITALIC", 32
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

Re: Preloading fonts and cross platform compatibility

Post by amyren »

I ran into the same problem running OS 3.14 under WinUAE. Then I found the cause of the problem with some help from SnoopDos. It is looking for freetype2.library and then it fails. After getting the library from aminet it did work.

MorphOS does have truetype support, but when running the 68k version it will expect freetype2.library to be present. So after putting the lib to sys:libs Morhpos will run the OS3 version. The WarpOS version still complains that it cant open that font.

If possible, I would prefer the error message for OS3 to tell that it failed to load freetype2.library. That would make it easier to figure out what is missing.
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

Re: Preloading fonts and cross platform compatibility

Post by amyren »

Just realized that using the inbuilt fontengine will make the freetype2.library not needed

Code: Select all

@FONT 1, "DS-DIGITAL BOLD ITALIC", 32, {Engine = #FONTENGINE_INBUILT}
Now it worked on OS3.14 without the library. I will create a WarpOS version as well to test later on MorphOS just to make sure.

It turns out, reading the manual sometimes pay off :)
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Preloading fonts and cross platform compatibility

Post by airsoftsoftwair »

amyren wrote: Fri Feb 21, 2020 12:45 pm It turns out, reading the manual sometimes pay off :)
Sure, that's why the 1000+ pages are there.

Using the inbuilt font engine is recommended anyway because only by using the inbuilt font engine are you guaranteed to get the same look on every system.
Post Reply