Prev: Passing an element within an element to a web service
Next: HTTP 500 Error when consuming .Net web service fromcoldfusion
From: frisbeejunkie on 29 Oct 2007 15:20 Hey there, looking for some help with cfimage. I've installed a TTF font on the Windows 2003 server, and in the CFadministrator. But when trying to use this font with cfimage, I get the following error: Unable to find font: Serif. It's not a syntax error because my code works fine with Arial or Verdana. I read the CF whitepapers and found a note that my code needs to reference the Font Face column in the CF Administrator exactly which I've done. I'm wondering if anyone else has had problems getting fonts working with cfimage? <cfset varText = "Here is the page title"> <cfset varColor = "FF0000"> <cfset varFont = "Century"> <cfset myImage=ImageNew("",400,400, "rgb", "FFFFFF")> <!--- Set the text attributes. ---> <cfset attr = StructNew()> <cfset attr.font = varFont> <cfset attr.underline = "no"> <cfset attr.size = 36> <cfset attr.style = "plain"> <cfset ImageSetDrawingColor(myImage, varColor)> <cfset ImageDrawText(myImage, varText, 100, 150, attr)> <cfimage action="writeTobrowser" source="#myImage#">
From: Virgil Spruit on 2 Nov 2007 08:54
On 29 okt, 20:20, "frisbeejunkie" <webforumsu...(a)macromedia.com> wrote: > Hey there, looking for some help with cfimage. I've installed a TTF font on > the Windows 2003 server, and in the CFadministrator. > > But when trying to use this font with cfimage, I get the following error: > Unable to find font: Serif. > > It's not a syntax error because my code works fine with Arial or Verdana. I > read the CF whitepapers and found a note that my code needs to reference the > Font Face column in the CF Administrator exactly which I've done. I'm > wondering if anyone else has had problems getting fonts working with cfimage? > > <cfset varText = "Here is the page title"> > <cfset varColor = "FF0000"> > <cfset varFont = "Century"> i'm curious about this function too. anybody? > <cfset myImage=ImageNew("",400,400, "rgb", "FFFFFF")> > > <!--- Set the text attributes. ---> > <cfset attr = StructNew()> > <cfset attr.font = varFont> > <cfset attr.underline = "no"> > <cfset attr.size = 36> > <cfset attr.style = "plain"> > <cfset ImageSetDrawingColor(myImage, varColor)> > > <cfset ImageDrawText(myImage, varText, 100, 150, attr)> > > <cfimage action="writeTobrowser" source="#myImage#"> |