huhaoke - 2006-12-28 16:21:00
我安装后,怎么显示不了验证码,提示这个字体找不到Georgia,不知道谁可以提供一下这个字体
bighead - 2006-12-28 17:41:00
问问你的虚拟主机的空间商看是不是限制了权限不允许访问font文件夹,看看能不能要求他打开
lishiminv - 2007-1-3 13:59:00
嗯,好多问题都是权限问题。。
只有空间商能解决的。。
7797588 - 2007-3-15 20:36:00
我个人觉得应该不关FONT文件夹的事,我用的是2003系统,也出现这样的问题哦..
7797588 - 2007-3-15 20:37:00
但是我在其它机试了一下又可以哦..系统也是2003的,晕啊,有谁能解释一下
lz_net_cs - 2008-3-25 13:36:00
我也遇到过你所的问题,是tools\verifyimagepage.aspx找不到georgia,分析DISCUZ.PlugIn.dll后发现生成随机码的函数是随机读取字体数组,它的代码如下
public VerifyImageInfo GenerateImage(string code, int width, int height, Color bgcolor, int textcolor)
{
VerifyImageInfo info = new VerifyImageInfo();
info.ImageFormat = ImageFormat.Jpeg;
info.C;
width = 120;
height = 40;
Bitmap image = new Bitmap(width, height, PixelFormat.Format32bppArgb);
Graphics graphics = Graphics.FromImage(image);
graphics.SmoothingMode = SmoothingMode.HighSpeed;
graphics.Clear(bgcolor);
int num = (textcolor == 2) ? 60 : 0;
Pen pen = new Pen(Color.FromArgb(Next(50) + num, Next(50) + num, Next(50) + num), 1f);
SolidBrush brush = new SolidBrush(Color.FromArgb(Next(100), Next(100), Next(100)));
for (int i = 0; i < 3; i++)
{
graphics.DrawArc(pen, Next(20) - 10, Next(20) - 10, Next(width) + 10, Next(height) + 10, Next(-100, 100), Next(-200, 200));
}
Graphics graphics2 = Graphics.FromImage(charbmp);
float x = -18f;
for (int j = 0; j < code.Length; j++)
{
m.Reset();
m.RotateAt((float) (Next(50) - 0x19), new PointF((float) (Next(3) + 7), (float) (Next(3) + 7)));
graphics2.Clear(Color.Transparent);
graphics2.Transform = m;
brush.Color = Color.Black;
x = (x + 18f) + Next(5);
PointF point = new PointF(x, 2f);
///下面这句是随机读取字体数组,希望下个版本把生成随机码的字体能改进一下,不然后台都进不了。
graphics2.DrawString(code[j].ToString(), fonts[Next(fonts.Length - 1)], brush, new PointF(0f, 0f));
graphics2.ResetTransform();
graphics.DrawImage(charbmp, point);
}
brush.Dispose();
graphics.Dispose();
graphics2.Dispose();
info.Image = image;
return info;
}
Discuz.Plugin.VerifyImage.JpegImage{
public class VerifyImage : IVerifyImage
}
VerifyImage类的静态构造函数如下:
static VerifyImage()
{
randb = new byte[4];
rand = new RNGCryptoServiceProvider();
m = new Matrix();
charbmp = new Bitmap(40, 40);
fonts = new Font[] { new Font(new FontFamily("Times New Roman"), (float) (0x10 + Next(3)), FontStyle.Regular), new Font(new FontFamily("Georgia"), (float) (0x10 + Next(3)), FontStyle.Regular), new Font(new FontFamily("Arial"), (float) (0x10 + Next(3)), FontStyle.Regular), new Font(new FontFamily("Comic Sans MS"), (float) (0x10 + Next(3)), FontStyle.Regular) };
}
ilovega - 2008-5-26 11:33:00
我也遇到这个问题,怎么办啊~~
ilovega - 2008-5-26 11:34:00
Font 'Georgia' cannot be found.