Cant use specific FontName in script

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

Post Reply
jytdahn
Posts: 1
Joined: Mon Aug 05, 2019 12:47 pm

Cant use specific FontName in script

Post by jytdahn » Mon Aug 05, 2019 1:15 pm

Hi

I am using GFLAx 2.60 in a vb script where I want to create an image where I am writing something in it...
The script works fine - but it won't use the FontName which I define...
The concerned font is registered on the Windows Server 2019 and it has worked before with the same font but on another server - Windows Server 2016...
So is there any permissions e.g. which has to be set for the concerned font and why is it not working with Futura font when it works ok when I choose font which was preinstalled with the OS..?

My script is like this:
------------------------------------------
base_folder="c:\some_folder"
id=1
img_width=210
img_height=130
Set img=CreateObject("GflAx.GflAx")
img.NewBitmap img_width,img_height,RGB(255,255,255)
img.UseTransparency=True
img.EnableLZW=False
img.SaveFormatName="png"
img.SaveFormat=3
img.SaveKeepMetadata=False
img.SavePNGCompression=1
img.MaskColor=RGB(255,255,255)
img.BackColor=RGB(255,255,255)
img.FontName="Futura Lt Bt"
img.FontSize=20
img.FontBold=True
img.FontItalic=False
img.FontUnderline=False
img.FontStrikeOut=False
img.TextOut "Hello world",1,1,RGB(242,107,97)
img.Soften 35
img.SaveBitmap base_folder & "\" & id
Set img=Nothing
------------------------------------------

And "Futura Lt Bt" is installed properly on the server but GFLAx is not using it - it rolls back to use a standard-font like 'Arial' or something like that instead. Any ideas of why I cant use that font Futura on this new server..?

Thanks.

Post Reply