Skip to main content
Inspiring
April 7, 2010
Answered

Extending TLF

  • April 7, 2010
  • 1 reply
  • 697 views

Hi,

I want to do some modifications to TLF. I know it comes in the SDk 4 but how can I get its source code? I copied it from the SDK folder (Adobe Flash Buiulder/sdks/4.0.0/frameworks/projects/textlayout/src) but when I imported it into a project, it had many erros, most of them because CONFIG::debug .

My question is, how can I get the source code so I can start the modifications?

tks.

This topic has been closed for replies.
Correct answer rdermer

Best would be to work from the sources in the 4.1 Flex SDK.  That version of TLF has some performance work in it that really helps with long documents.

The way we build things is for each project textLayout_core, textLayout_conversion and textLayout_edit specify additional compiler arguments in the Flex Library Compiler panel of the project properties.

For textLayout_core

-locale en_US -include-namespaces library://ns.adobe.com/flashx/textLayout -load-config+=../../config.xml

For textLayout_conversion and textLayout_edit

-locale en_US -load-config+=../../config.xml

config.xml is in the same directory as the folders and looks like this

<flex-config xmlns="http://www.adobe.com/2006/flex-config">
  <compiler>
    <define>
      <name>CONFIG::debug</name>
      <value>false</value>
    </define>
    <define>
      <name>CONFIG::release</name>
      <value>true</value>
    </define>
  </compiler>
  <!-- this may be redundant if its also set in the SDK.  -->
  <!-- some versions of the flex compilers may generate errors on multiple settings -->
  <target-player>10.0.0</target-player>
</flex-config>

Hope that helps

Richard

1 reply

rdermerCorrect answer
Adobe Employee
April 7, 2010

Best would be to work from the sources in the 4.1 Flex SDK.  That version of TLF has some performance work in it that really helps with long documents.

The way we build things is for each project textLayout_core, textLayout_conversion and textLayout_edit specify additional compiler arguments in the Flex Library Compiler panel of the project properties.

For textLayout_core

-locale en_US -include-namespaces library://ns.adobe.com/flashx/textLayout -load-config+=../../config.xml

For textLayout_conversion and textLayout_edit

-locale en_US -load-config+=../../config.xml

config.xml is in the same directory as the folders and looks like this

<flex-config xmlns="http://www.adobe.com/2006/flex-config">
  <compiler>
    <define>
      <name>CONFIG::debug</name>
      <value>false</value>
    </define>
    <define>
      <name>CONFIG::release</name>
      <value>true</value>
    </define>
  </compiler>
  <!-- this may be redundant if its also set in the SDK.  -->
  <!-- some versions of the flex compilers may generate errors on multiple settings -->
  <target-player>10.0.0</target-player>
</flex-config>

Hope that helps

Richard

Participating Frequently
April 8, 2010

In our opensource repository for the Flex SDK, the frameworks/projects/textLayout directory contains Flash Builder 4 project files for building TLF. Projects like this are not included in official builds of the SDK, but they should work... we use them internally on the Flex team.

Gordon Smith

Adobe Flex SDK Team

oscar7878Author
Inspiring
April 8, 2010

Thanks Gordon, this really helps.