For me, the font looks right although the console reports Times New Roman.  
Which version of TLF are you using?

On 10/26/11 5:41 PM, "Baz" <> wrote:

We're on 4.1.


On Wed, Oct 26, 2011 at 2:56 PM, Alex Harui <> wrote:

Which version do want it to work in?

On 10/26/11 1:44 PM, "Baz" < <> > 

Actually what Alex mentioned is correct too - I need to change the linkage to 
"merged into codes well as upgrade to 4.5.1.


On Wed, Oct 26, 2011 at 1:40 PM, Baz < 
<> > wrote:
My examples work in Flex 4.5.1, and monkey patching is not straightforward 
based on my Googling. Looks like no way out without upgrading.


On Tue, Oct 25, 2011 at 12:37 PM, Baz < 
<> > wrote:
Hey Alex,

I tried changing "Framework Linkage" to "Merged into Code" as well as 
checking/unchecking "use local debug runtimes..." without much effect. I'm 
reading your blog and piecing out what might apply to me. It's pretty advanced 
stuff. The thing is the font is there - if I specify it directly in 
RichEditableText it shows up. What is the container doing to TextFlow that I am 
not, and how can I mimic that. I've introspected almost every property and 
function of TextFlow, FlowComposer, ContainerController, TextFlowLine and 
TextLine (I've been on this for many days now :). Judging by the output of 
textFlowLine.getTextLine().textBlock.dump(), TLF is just not aware/registering 
the font until after the container is rendered.

If you are curious to see it work and fail side-by-side in a simplified 
compilable app, check out:

If you run it, you will notice 4 RichEditableTextContainers. The first two use 
device fonts (Courier and Arial), and they are interpreted correctly. The trace 
of the dump() in the console shows this nicely. The third box, in red, is the 
problem. This box tries to employ an embeded font before the container is 
rendered, and if you look at the trace, it's not accepting the font and instead 
using the default Times New Roman. The fourth box is exactly the same as the 
third box, but solves the problem by applying the truncation at updateComplete, 
rather than on initialize. The trace shows the font to be correct as well.

 Do you think all this is related to contexts and multiple swfs as you describe 
in your blog?


What do you make of this? Is there a way to mimic what happens to textFlow on 
updateComplete but inside initialize?

On Tue, Oct 25, 2011 at 10:02 AM, Alex Harui < 
<> > wrote:

See the embedded font post on my blog.  The control  needs to have the right 
SWF context.  Does it work if you turn off RSLs?

On 10/25/11 3:01 AM, "Baz" < <>  
<> > wrote:


Anyone have any idea why the embedded font in the following basic application 
does not show up?

<?xml version="1.0" encoding="utf-8"?>



<>  <>  
<> "

         xmlns:mx="library:// <> 
 <>  <> "


         minWidth="955" minHeight="600">



                             import flash.text.engine.FontLookup;

                             import flashx.textLayout.elements.TextFlow;


                             import spark.utils.TextFlowUtil;

fontFamily="zem", embedAsCFF="true", fontWeight="normal", 

                             public const zem_embed_class:Class;

                             protected var embeddedFontMarkup:XML =  <p 
fontFamily="zem" fontLookup="embeddedCFF"><span>Some content</span></p>;

                             protected function 
application1_initializeHandler(event:FlexEvent):void          {

                                       var textFlow:TextFlow = 

                                       textFlow.fontFamily = 'zem';

                                       textFlow.fontLookup = 

                                       one.textFlow = textFlow;




         <s:RichEditableText id="one" width="500" height="204" 
renderingMode="cff" fontLookup="embeddedCFF" />


I know the font works because if I specify any embedded font directly in the 
RichEditableText, the specified embedded fonts shows up.



Alex Harui
Flex SDK Team
Adobe System, Inc.

Reply via email to