Using the code below works fine on windows 2008 and above but on windows 2003 the call to Annotate generates a warning in the debug log and no text is written on the image
unable to read font `c:\windows\arial.ttf' @ error/annotate.c/RenderFreetype/1177. (Note the path should be c:\windows\fonts...)
changing the font to have a full path to the font file does not help and produces
unable to read font `c:\WINDOWS\Fonts\arial.ttf' @ warning/annotate.c/RenderType/917.
unable to read font `c:\windows\arial.ttf' @ error/annotate.c/RenderFreetype/1177.
```
Using d As MagickImage = New MagickImage("c:\temp\1.jpg")
d.Debug = True
d.Font = "arial"
d.FillColor = New MagickColor(Drawing.Color.White)
d.FontPointsize = 25
d.TextUnderColor = New MagickColor(Drawing.Color.Red)
d.Annotate("Anon", Gravity.Southeast)
d.Format = MagickFormat.Jpeg
d.CompressionMethod = CompressionMethod.JPEG
d.Quality = 90
d.Interlace = Interlace.NoInterlace
d.Write("c:\temp\2.jpg")
End Using
```
The same happens with all fonts I tried
Comments: Are you using the same version of Magick.NET on both servers? I can read a font from a directory without any problems with the latest version of Magick.NET. ```C# class Program { static void image_Warning(object sender, WarningEventArgs e) { Console.WriteLine(e.Message); } static void Main(string[] args) { using(MagickImage image = new MagickImage("xc:red", 400,400)) { image.Warning += image_Warning; image.Font = @"C:\foo\test.ttf"; // When you uncomment the line below you will get a 'warning' printed to the console. //image.Font = @"C:\foo\bar.ttf"; image.FontPointsize = 60; image.Annotate("TEST", Gravity.Center); image.Write(@"C:\foo\test.png"); } } ``` Are you sure that the file 'c:\WINDOWS\Fonts\arial.ttf' exists? And are you setting any options like 'FontWeight' / 'FontStyle'? You might have to pick one of the other fonts then: ``` arial.ttf arialbd.ttf arialbi.ttf ariali.ttf ARIALN.TTF ARIALNB.TTF ARIALNBI.TTF ARIALNI.TTF ariblk.ttf ```
unable to read font `c:\windows\arial.ttf' @ error/annotate.c/RenderFreetype/1177. (Note the path should be c:\windows\fonts...)
changing the font to have a full path to the font file does not help and produces
unable to read font `c:\WINDOWS\Fonts\arial.ttf' @ warning/annotate.c/RenderType/917.
unable to read font `c:\windows\arial.ttf' @ error/annotate.c/RenderFreetype/1177.
```
Using d As MagickImage = New MagickImage("c:\temp\1.jpg")
d.Debug = True
d.Font = "arial"
d.FillColor = New MagickColor(Drawing.Color.White)
d.FontPointsize = 25
d.TextUnderColor = New MagickColor(Drawing.Color.Red)
d.Annotate("Anon", Gravity.Southeast)
d.Format = MagickFormat.Jpeg
d.CompressionMethod = CompressionMethod.JPEG
d.Quality = 90
d.Interlace = Interlace.NoInterlace
d.Write("c:\temp\2.jpg")
End Using
```
The same happens with all fonts I tried
Comments: Are you using the same version of Magick.NET on both servers? I can read a font from a directory without any problems with the latest version of Magick.NET. ```C# class Program { static void image_Warning(object sender, WarningEventArgs e) { Console.WriteLine(e.Message); } static void Main(string[] args) { using(MagickImage image = new MagickImage("xc:red", 400,400)) { image.Warning += image_Warning; image.Font = @"C:\foo\test.ttf"; // When you uncomment the line below you will get a 'warning' printed to the console. //image.Font = @"C:\foo\bar.ttf"; image.FontPointsize = 60; image.Annotate("TEST", Gravity.Center); image.Write(@"C:\foo\test.png"); } } ``` Are you sure that the file 'c:\WINDOWS\Fonts\arial.ttf' exists? And are you setting any options like 'FontWeight' / 'FontStyle'? You might have to pick one of the other fonts then: ``` arial.ttf arialbd.ttf arialbi.ttf ariali.ttf ARIALN.TTF ARIALNB.TTF ARIALNBI.TTF ARIALNI.TTF ariblk.ttf ```