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: The log *was* created using your code (translated into vb.net) this is all the code that was ran ``` 'End Using MagickNET.SetLogEvents(LogEvents.All Or LogEvents.Trace) AddHandler MagickNET.Log, AddressOf MagickNET_Log Using image As New MagickImage("xc:red", 400, 400) image.Font = "c:\temp\arial.ttf" image.FontPointsize = 60 image.Annotate("TEST", Gravity.Center) image.Write("C:\temp\2.png") End Using ``` The issue happens on a few windows 2003 machines I have tested. I have copied the font to a different folder and gave that file full permission to everyone. still the same error occurs If needed I could arrange for you a windows 2003 ISO which you can download and run on a virtual pc
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: The log *was* created using your code (translated into vb.net) this is all the code that was ran ``` 'End Using MagickNET.SetLogEvents(LogEvents.All Or LogEvents.Trace) AddHandler MagickNET.Log, AddressOf MagickNET_Log Using image As New MagickImage("xc:red", 400, 400) image.Font = "c:\temp\arial.ttf" image.FontPointsize = 60 image.Annotate("TEST", Gravity.Center) image.Write("C:\temp\2.png") End Using ``` The issue happens on a few windows 2003 machines I have tested. I have copied the font to a different folder and gave that file full permission to everyone. still the same error occurs If needed I could arrange for you a windows 2003 ISO which you can download and run on a virtual pc