Hi. I've tried the method above, as well as adding the font to a types.xml that I've placed in the bin directory of my web application (I don't have access to directories outside the web root). My code uses the HttpSeverUtility.MapPath method to get an
absolute path to a ttf file in the web application like so:
DrawableFont font = new DrawableFont(HttpContext.Current.Server.MapPath("/includes/font/boton-700-webfont.tff"));
DrawablePointSize size = new DrawablePointSize(24);
DrawableStrokeColor strokeColor = new DrawableStrokeColor(new MagickColor("#FFF"));
DrawableFillColor fillColor = new DrawableFillColor(new MagickColor("#FFF"));
DrawableText drawableText = new DrawableText(135, 730, text);
result.Draw(font, size, strokeColor, fillColor, drawableText);
But using a path like "D:\another-random-font.ttf" doesn't work either. The text is rendered, but using a plain (Sans-serif) font.
The types.xml (generated by imagick_type_gen with the path to the ttf file as argument) looks like this:
Maybe the types.xml file is in the wrong location, but I'd rather use a path anyway. What am I doing wrong?
Thanks in advance.