Skip to main content
vigneshs53970460
Known Participant
Nov 3, 2016 3:07 PM UTC
Question

event.target.textFont

event.target.textFont = font.arial;

This is my code, how to fix the "Arial Black" font in the text field and I am using this in "Custom calculation script".

Can anyone help with this.

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

vigneshs53970460
Known Participant
Nov 4, 2016 3:34 PM UTC

You are awesome!

It's working now. thank you so much for your kind help.

Translate
vigneshs53970460
Known Participant
Nov 4, 2016 12:41 PM UTC

Thanks you all.

I should not do it by manually, I need a JavaScript.

Using "event.target.textFont = font.Times;" script, I need to change the font into "Arial Black" instead of Times New Roman.

I changed the font to "Arial" but I cannot change the font to "Arial Black".

This is the following script, which I used to change the font to "Arial" (event.target.textFont = 'Arial').

Translate
try67
Community Expert
Community Expert
Nov 4, 2016 12:52 PM UTC

Use this code:

event.target.textFont = "Arial-Black";

Translate
JR Boulay
Community Expert
Community Expert
Nov 4, 2016 10:23 AM UTC

I just need to change the font type and I am unable to find the "custom format script".

You will find it in the "Format" tab.

Translate
Acrobate du PDF, InDesigner et Photoshopographe
vigneshs53970460
Known Participant
Nov 4, 2016 6:46 AM UTC

The text field is in "Read-only" format.

See the below pic. The font is in "Times New Roman" and I need to change that in "Arial Black".

event.target = 'Accepting the Order';

event.target = color.black;

event.target.textSize = 10;

event.target.textFont = font.Times;

event.target.alignment = "left";

I just need to change the font type and I am unable to find the "custom format script".

Translate
try67
Community Expert
Community Expert
Nov 4, 2016 7:23 AM UTC

Is this change conditional on the value of the field? If not, why not

simply do it once manually and that's it?

Translate
JoelGeraci_Datalogics
Participating Frequently
Nov 3, 2016 4:02 PM UTC

You'll probably want to put that script in the Custom Format script and custom fonts are addressed by their name, not the font object.

Example:

this.getField("myField").textFont = "Viva-Regular";

Translate