'libfreetype6' error - MonoGame 3.7 on MacOS Mojave

So I’ve been stuck on this issue for a few weeks now, and I’m wondering if anybody is able to assist. Basically, when I try to build a project containing SpriteFonts, I’m met with a ‘FontDescriptionProcessor’ error(Listed below). I’ve tried using Visual Studio Code, VS 2019 and 2017, with MonoGame 3.6, 3.7, and 3.7.1 and all have the same issue. This is happening on my Retina 15" Mid-2012 Macbook Pro, but whats unusual is that I did the exact same process on my 2009 White Macbook both running Mojave, and it worked out of the box. Surely there must be some sort of solution, other than manually rendering the fonts with Texture2D’s, which is what I am currently doing.
Thanks in advance.

Here is the terminal output:

Restore was successful.
Building Font /Users/user/Documents/Projects/RPG/Content/Modum.ttf
/Users/user/Documents/Projects/RPG/Content/fontNormal.spritefont : error : Processor ‘FontDescriptionProcessor’ had unexpected failure! [/Users/user/Documents/Projects/RPG/RPG.csproj]
System.DllNotFoundException: Unable to load shared library ‘freetype6’ or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libfreetype6, 1): image not found
at SharpFont.FT.FT_Init_FreeType(IntPtr& alibrary)
at SharpFont.Library…ctor()
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.SharpFontImporter.Import(FontDescription options, String fontName) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\MonoGame.Framework.Content.Pipeline\Graphics\Font\SharpFontImporter.cs:line 29
at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.ImportFont(FontDescription options, Single& lineSpacing, Int32& yOffsetMin, ContentProcessorContext context, String fontName) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\MonoGame.Framework.Content.Pipeline\Processors\FontDescriptionProcessor.cs:line 186
at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.Process(FontDescription input, ContentProcessorContext context) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\MonoGame.Framework.Content.Pipeline\Processors\FontDescriptionProcessor.cs:line 82
at Microsoft.Xna.Framework.Content.Pipeline.ContentProcessor`2.Microsoft.Xna.Framework.Content.Pipeline.IContentProcessor.Process(Object input, ContentProcessorContext context) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\MonoGame.Framework.Content.Pipeline\ContentProcessor.cs:line 60
at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\MonoGame.Framework.Content.Pipeline\Builder\PipelineManager.cs:line 717
Skipping /Users/user/Documents/Projects/RPG/Content/grass16.png
/Users/user/.nuget/packages/monogame.content.builder.task/,5): error MSB3073: The command “dotnet tool run mgcb /quiet /@:”/Users/user/Documents/Projects/RPG/Content/Content.mgcb" /platform:DesktopGL /outputDir:"/Users/user/Documents/Projects/RPG/Content/bin/DesktopGL/Content" /intermediateDir:"/Users/user/Documents/Projects/RPG/Content/obj/DesktopGL/Content" /workingDir:"/Users/user/Documents/Projects/RPG/Content/"" exited with code 1. [/Users/user/Documents/Projects/RPG/RPG.csproj]
The terminal process “dotnet ‘build’, ‘/Users/user/Documents/Projects/RPG/RPG.csproj’, ‘/property:GenerateFullPaths=true’, ‘/consoleloggerparameters:NoSummary’” terminated with exit code: 1.

1 Like

Looks to me like the freetype6 dll is not in the expected location

I haven’t worked on the mac version of Monogame , so I cannot tell you where it should be, but mac has strange rules for dll’s

As far as I know , they have to be in the package directory rather than the execution directory

I had this, think we spoke about it on the FB page, but I only know how I solved it for Windows, no idea with Mac, sorry…

That would be me yes lol, honestly its not much of an issue at this point since I’ve now built my own rendering system, but would still be nice to fix.

1 Like