Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

TLF Text - Negative leading values in TextFormat

Contributor ,
Nov 13, 2013 Nov 13, 2013

TLF seems not supporting negative values for "leading" (like Classic text) ?!

This code :

var tf : TextFormat = new TextFormat();

            tf.leading = -50;

            myText.setTextFormat(tf);

works fine in "Classic Text" but not TLF.

in Both cases (Classic, TLF) the result os TRACE is the same:

trace (myText.getTextFormat().leading);  // -50

But actually MINUS VALUES have no effect, and it is exactly the same as when leading is 0.

Any solution for this please?

Thanks a lot.

(Actual design when I apply different leading amounts based on a Function to the part BELOW horizontal line)

leading.png

By the way, I also checked the same with "Arial" & "Tahoma", so it is not a unicode (Asian Fonts) issue.

TOPICS
ActionScript
549
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Nov 13, 2013 Nov 13, 2013

After lots of playing with code, I could solve it with a funny code!!

When I set leading to any number, it fails to show the CORRECT LINE SPACING :

tf.leading = -50;  // or ZERO or ANY OTHER NUMBER!


When I simply DO NOT SET leading (!!!) or set it to "null" (as it is by default), then line spacing becomes as it should be!!

tf.leading = null;

02.png

Hope it could hlep others


Translate
Contributor ,
Nov 13, 2013 Nov 13, 2013
LATEST

After lots of playing with code, I could solve it with a funny code!!

When I set leading to any number, it fails to show the CORRECT LINE SPACING :

tf.leading = -50;  // or ZERO or ANY OTHER NUMBER!


When I simply DO NOT SET leading (!!!) or set it to "null" (as it is by default), then line spacing becomes as it should be!!

tf.leading = null;

02.png

Hope it could hlep others


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines