So I created a Windows OpenGL project. Added a sprite, went well. All was good. Added a spritefont, and when ever I try to build now I get an error saying;
Build started 17.10.2015 00:32:33
Skipping C:/..MyProject../Content/is_it_worth_the_time.png
Skipping C:/..MyProject../Content/santa-sprite.png
C:/..MyProject../Content/font.spritefont
Building Font C:\WINDOWS\Fonts\arial.ttf
System.DllNotFoundException: Unable to load DLL 'freetype6.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
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)
at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.ImportFont(FontDescription options, Single& lineSpacing, Int32& yOffsetMin, ContentProcessorContext context, String fontName)
at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.Process(FontDescription input, ContentProcessorContext context)
I’ve installed the VC redist files, 2013. Control Panel list 2008, 2010, 2013 as installed.
The freetype6.dll is inside the tools folder.
I’ve tried adding zlib1.dll to the folder as it was mentioned that this was a dependency for freetype6.dll.
Any help would be great, as of now I can’t add spritefonts…
I ran into a similar problem with the FreeImage DLL. It was clearly in the same directory a MGCB.exe, but it wasn’t being found for some reason. Try downloading the stable MonoGame 3.4 release and using the pipeline installed by that instead.
I uninstalled the latest build of MonoGame, installed 3.4, copied the tools folder to a different place on my hard drive, then uninstalled 3.4 and reinstalled the latest build. Now I use the 3.4 pipeline as a standalone tool to build xnbs and just drag and drop the xnbs into my project’s debug folder.
Hmm. If you were already using 3.4, maybe using the latest build’s content pipeline instead would work? I know so little about MonoGame that I just have to resort to trying different things until it works. What worked for me may not work for you, unfortunately.
As for IRC, speaking for myself, I had never heard of it until you mentioned it.
Wish I could help more, but I’ve never actually tried using spritefonts. If one of the devs or someone more knowledgeable sees this, they should be able to help more. In the meantime, looking at the source itself is probably your best bet.
So removed every single bit connected to MonoGame that I could find. Installed both 64bit and 32bit, cause why the fuck not. Installed MonoGame. Rebooted. Now working it seems.
Well … I watched what Pipeline.exe was doing with Sysinternals procmon, and it looks like it finds the file ok but still fails to load it. I assume it’s because the image doesn’t match the OS. corflags suggests Pipeline is AnyCPU and dumpbin suggests freetype6.dll is x64 … sheeeesh.
EDIT: ah, it has a dependency on the VC++ runtime for 2012, which isn’t shipped on Windows 10. Installing that fixes the problem.