Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Why would the TextField.font.size property not be working?


Level 1

Hello discussion group,

I have this script in place:

var n = nFirst + nSecond + 17;

// last element represents no. of

// characters in ""

if (n >= 24) {

          if (n >= 27) {

                    topmostSubform.Page1.Email_address.font.size = "7pt"


          else {

                    topmostSubform.Page1.Email_address.font.size = "8pt"




else {

          topmostSubform.Page1.Email_address.font.size = "9pt"


Can anyone suggest why it might not be working? I'm able to change other properties of text fields like fill colour, border edge colour etc., but not font size. I've noticed some posting on this subject use the property TextField.textSize instead? I'm using LiveCycle Designer 9 / Acrobat X.

I'm trying to reduce the font size in a field for an email address so that it's not truncated except for an exceptionally long entry.

Perhaps I have the script attached to the wrong event. I've attached it to a calculate event.

Any assistance would be greatly appreciated.

Michael Sandel

0 Replies


Level 3

Hi Michael_Sandel_4470,

If you want to automate the font size as per the content of the textfield ou can follow below steps.

Select the field --> open font palette and clicking on small arrow icon on the top left, select 'Edit Value'.


Enter the font size 0(Zero).

The field will automatically adjust the font size as per the content.




Level 1

Dear Ratnesh,

Thank you for the reply. Yes, I've ended up using that method. I'm still curious why the original approach is not working though.

I had seen the "set font size to 0 using the LCD dialogue box" method on other postings. I experienced the same behaviour that others have mentioned, where sometimes the automated font size is too big (or bigger than you'd like). I managed to control this behaviour, and apply an upper cap to the font size by adding some "space before" on the paragraph tab.

Paragraph spacing before.JPG

Thanks again.


Michael Sandel