I have created my custom captcha image, which is not rendering due to missing font on server.
private const string FontFamily = "Arial"; //this one works
private const string FontFamily = "Rockwell"; //this one is not existing on server
How do i provide the font file to the application to use my custom font family from file?
at the moment i have my function as:
using (Font font = new Font(FontFamily, 1f)){
//rest of the code
}
This depends on your custom captcha drawing method, but you generally have the function drawString(), where you can add your newly registered font via a PrivateFontCollection() to write text with. An example in VB would be:
Source: http://www.tutorialsasp.net/uncategorized/loading-and-previewing-fonts-from-files-in-aspnet/