Fonts not working

Windows Server 2016 Standard
Lucee 5.3.8.189 New Install

Trying to test the fonts with a simple code example below.
The text doesn’t change when I modify the font.

Is there a way to point Lucee to use the fonts in c:\windows\fonts ?
Is there a way to add custom fonts? I don’t see the fonts.jar in any of the Lucee folders in this new version.

<cfset imgText = ImageNew("",320,20,"argb")>
<cfset ImageSetDrawingColor(imgText,"black")>
<!--- Set the attributes of the text --->
<cfset textattribs = StructNew()>
<cfset textattribs.font="Arial">
<cfset textattribs.size = 20>
<!--- Draw the text. --->
<cfset ImageDrawText(imgText, "Test text", 10, 15, textattribs)>

<cfimage action="writeTobrowser" source="#imgText#" >

@dmarinello Your example is not clear with your title and description. For imagesetdrawingcolor() examples check here ImageSetDrawingColor() :: Lucee Documentation. Otherwise, can you explain a bit more?

I was using an Image Function to test the fonts.

Where you see the line <cfset textattribs.font , when I change the font names, the output doesn’t reflect the font changes.

I edited your post, you need to wrap code using the code button

here is a potential workaround
https://www.lucee.nl/post.cfm/lucee-cfimage-custom-fonts

@dmarinello I checked with your code and fonts are working fine with lucee, Changing the font name reflects the output. Could you please check with this below example?

<cfloop array="#imageFonts()#" index="fonts">

  <cfset imgText = ImageNew("",320,20,"argb")>
  <cfset ImageSetDrawingColor(imgText,"black")>
  <!--- Set the attributes of the text --->
  <cfset textattribs = StructNew()>
  <cfset textattribs.font="#fonts#">
  <cfset textattribs.size = 20>
  <!--- Draw the text. --->
  <cfset ImageDrawText(imgText, "Test text", 10, 15, textattribs)>
  
  <cfimage action="writeTobrowser" source="#imgText#" >
</cfloop>

How can I add fonts to the ImageFonts that exist in Lucee?

Did you look at the workaround link I posted?

I did. It gives me an error on the following line:
<cfset sFont = oFont.createFont(oFont.TRUETYPE_FONT, stream) />

Isn’t there a way to add fonts one time to the Lucee Default Fonts? I remember doing something with a fonts.jar file. I don’t see that file anywhere in the Lucee subdirectories.