日期:2014-05-17  浏览次数:20906 次

aspjpeg 2.1 写水印,怎么字体小的不能看,或者就水印字笔画都挤一块了?
因为在本地测试我的代码出问题, 因此在官网复制了段代码来研究在GIF上写文字水印。
在 GIF 图片的一角写水印, 因为是水印,所以字体要求比较小,比如 6 7 的样子。
但是都小的不能看。

比如:
Gif.FontFamily = "Arial" ’或者是我下载的几个微字体如:hooge 05_53
Gif.FontSize = 8
都只是几个点,根本就不能看。
Gif.FontSize = 16
字体大小改成16后,大是大了,但笔画都挤在一块, 也不能看。


如果用官网上代码的字体:
Gif.FontFamily = "Courier"
Gif.FontSize = 8
这个能看, 但 Gif.FontSize 虽然是8 但实际测试下来是16.

这是咋回事?


这个是官网找的代码,略做简化:
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Set Gif = Jpeg.Gif
Gif.AddFrame 300, 200, 0, 0
Gif.PenColor = 10
Gif.BrushColor = 10
Gif.DrawBar 0, 0, 300, 200
Gif.PenColor = 201
Gif.FontFamily = "Courier"
Gif.FontSize = 8
Gif.PrintText 18, 15, "XYZ, Inc. Market Share"
Gif.Save Server.MapPath("chart1.gif") 


------解决方案--------------------
http://hi.baidu.com/dondou/blog/item/1fa6110ef685332c6159f30a.html