Like in the above image, when the input exceed the width of field, it should auto shrink to lower font size to show all input, but it didn’t. Do you know why?
Hm, I don’t believe what you described is the default behavior. Trying this out with a text field/widget in our viewing sample, the text will simply continue to concatenate to the right. I think you will have to provide more details so that I can reproduce this behavior.
As a side note, you should initialize the font object with the font and size as there are no default values for the object:
new Annotations.Font({ name: 'Helvetica', size: 24, })
I tried this out and it is auto-calculating the font size. You might get better accuracy by providing a font name, but ultimately, the text will reach a minimum size and stop. That minimum size is 4.
Can you check and confirm the size of the text when you reproduce the issue?
Was there ever any resolution to this? I am setting font size for a field/widget annotation and the text is not shrinking either: new Annotations.Font({ name: ‘Helvetica’, size: 24, }).
Is there some magic to get the text to shrink to stay in the input size?