Archive

Archive for October, 2008

TileCache: Getting Cutoff on the edges

October 24th, 2008 rupert Comments off

In Tilecache, metaTiling creates larger tiles and chops them up.
Note the difference between using metatile=yes and metatile=no.

metatile_no.png

Figure 1: metatile=no

metatile_yes.png

Figure 2: metatile=yes

Categories: tilecache Tags:

ColdFusion Fonts

October 8th, 2008 rupert Comments off

I was trying to make a chinese text drawn in an image. That worked flawlessly on my Mac. Upon svn updating my files in production, the characters in the image became squares again.

Picture 4.png

First hunch was to change my file.encoding as from my previous post. But didn’t helped, so I changed the font from the CF code itself..

 <cfset attr = StructNew() />
 <cfset attr.size = 16 />
 <cfset attr.style = "plain" />
 <cfset attr.font = "microsoft yahei" />

I noticed that using the obvious fonts (Arial, Tahoma) didn’t worked. It always complained it can’t find the font…

Picture 5.png

I remember using msyh.ttf (Microsoft Yahei) in Mapserver for producing Chinese text. So what I did was, I copied msyh.ttf and dropped it in the coldfusion fonts directory (/opt/coldfusion8/runtime/jre/lib/fonts) then restarted coldfusion. Afterwards, I was able to see msyh.ttf from the Font Management of CFIDE Administrator. From there… I was able to display the image with Chinese Characters..

Picture 3.png

Categories: coldfusion Tags: ,