"EFreeTypeLibraryNotFound" ERROR when "Compile and Run" the platformer demo for Web

I have loaded the platformer demo and when I try to save it for Web I got this error:
Compiling project “platformer” for target “web” in mode “debug”.
Exception “EFreeTypeLibraryNotFound”:
Cannot load FreeType library, loading font files not possible
Command finished with status 1.

I have been checking the folder but I don´t yet know if it´s another file apart of the “freetype.dll” that is inside this folder…
Is this .dll file that library or I need another file?

The link of the screenshot is uploaded here in archive(dot)org:
Screenshot .
Sorry for my ignorance.

It’s a quirk (IOW, known and of course temporary bug, we will fix it :slight_smile: ) of building for web, from Windows, with a project that includes custom fonts.

See Web Target | Manual | Castle Game Engine , section " 8. Plans (TODOs)",

Fix reading fonts by the build tool on Windows. Right now this is disabled because build tool right now doesn’t use dynamic libraries, to avoid locking (thus preventing removal/updating) of DLLs of the project. We need to enable loading DLLs in build tool such that it will not lock project DLLs.

I know, it’s weird that this problem affects specifically only building from Windows. Building from Linux goes OK. It’s because this interacts with a hack we needed to do to avoid other Windows problems in the past :slight_smile:

We’ll fix it soon.

In the meantime, if you want a quick workaround, you can hack CGE:

(edit: fixed link)

Perfect!
I hope it will reprogrammed and fixed soon.
Regarding Linux, I need time to start using it…

In the meantime, I’ll continue using the binary export to Windows…
As soon as I have a demo, I’ll upload it for viewing. :shushing_face:

Thanks for the reply :wink:

1 Like

Fixed!

Building projects that use fonts (like our examples/platformer) for web from Windows will now work out-of-the-box, no longer causing errors about FreeType.

I just tested, doing from terminal

cd ..../examples/platformer
castle-engine compile --target=web --mode=debug
castle-engine run --target=web

on Windows, and it works :slight_smile:

The fix is committed to the engine “master” branch on Github and will be available in the downloads soon, after it passes a few automatic tests. You can observe this page, when it will no longer show the commit titled “Allow build tool on Windows to use FreeType when generating fonts…” then the fix has been tested and is part of the downloads on Download Castle Game Engine - Free Open-Source Game Development Tool .

Note that servers are somewhat busy now with builds of recent changes, give them a few hours to catch up :slight_smile: