Preloading fonts and cross platform compatibility

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

Preloading fonts and cross platform compatibility

Post by amyren » Wed Feb 12, 2020 10:07 pm

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: 577
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Re: Preloading fonts and cross platform compatibility

Post by Juan Carlos » Wed Feb 12, 2020 10:21 pm

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: 96
Joined: Thu May 02, 2019 11:53 am

Re: Preloading fonts and cross platform compatibility

Post by amyren » Thu Feb 13, 2020 11:18 pm

No plugins is used, only the use of font was changed.

User avatar
airsoftsoftwair
Posts: 3359
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Preloading fonts and cross platform compatibility

Post by airsoftsoftwair » 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?

amyren
Posts: 96
Joined: Thu May 02, 2019 11:53 am

Re: Preloading fonts and cross platform compatibility

Post by amyren » Tue Feb 18, 2020 9:08 am

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: 96
Joined: Thu May 02, 2019 11:53 am

Re: Preloading fonts and cross platform compatibility

Post by amyren » Fri Feb 21, 2020 12:12 am

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: 96
Joined: Thu May 02, 2019 11:53 am

Re: Preloading fonts and cross platform compatibility

Post by amyren » Fri Feb 21, 2020 12:45 pm

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: 3359
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Preloading fonts and cross platform compatibility

Post by airsoftsoftwair » Fri Feb 21, 2020 6:42 pm

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