Skip to main content
Participating Frequently
August 19, 2013
Question

TextField: TextFields with the same size & leading still differ

  • August 19, 2013
  • 1 reply
  • 780 views

At our company, we created a photobook editor in Flash. But now we stumbled upon a really strange issue:

The leading of two textfield (no TLF, just oldskool TextField) with the same leading and size properties, differ!

1. Editor

Here are two screenshots of debugging the photobook editor:


In this screenshot I attached a click listener to the textField and used a breakpoint to directly read the leading values.

Furthermore, this.textElement is just a model object containing various properties that are being saved/loaded to XML.

As you can see, the textfield's textformat property leading is 14, font size is 46. Keep that in mind.

2. Measuring Tool

To check whether this leading was correctly shown, i created a second FLA that also dynamically creates a textfield with this font, size and leading, see below:

On this one I also attached a click listener that traces the values of the selected TextField.

As you can see, this textfield ALSO has the same leading and fontsize. Hold that thought.

3. Merged screenshots

What if we merged these too screenshots, and scale them down to the same size?

You'd now think that while using the same leading and size, it should be the same leading...

WRONG!

How can this be? Both textfields have the same leading/size property, but they still differ!!!

What else can possibly have such an effect on the display of text in this textField?

I honestly cannot wrap my mind around this... Does anybody have a clue on where to look for a cause?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
August 19, 2013

are you using flash cc?

if yes, check the flash cc forum for similar threads.

Participating Frequently
August 20, 2013

nope, just the normal Flash CS6 (with Flash Builder IDE) 

could it possibly be a embedded font problem? The project consists of three SWFs, 1 preloader, 1 fonts.swf with all the fonts, and 1 main.swf - maybe there are some fonts conflicting internally?

kglad
Community Expert
Community Expert
August 20, 2013

i don't see how a font problem would be the issue if:

1.  all your fonts are embedded and the test computer has those fonts.

2.  the properties of the textfields are the same, esp. the leading.

to work-around your problem, you could

1. copy the one textfield and in place of the one that isn't working identically, paste the original and change its instance name.

2. use dynamically created textfields.