Skip to main content
Inspiring
June 2, 2010
Question

Link and embedded fonts

  • June 2, 2010
  • 1 reply
  • 1419 views

Hi,

I'm using this to set the general format of my text flow:

<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' fontSize='16' textIndent='0' paragraphSpaceAfter='0' paddingTop='5' paddingLeft='0' paddingRight='0' lineHeight='100%' fontFamily='RockwellCFF'>
<TextLayoutFormat color='#ff0000' id='hoverOverBrand' />
<TextLayoutFormat color='#00ff00' id='mouseDownOverBrand' textDecoration='underline' />
<TextLayoutFormat color='#0000ff' id='defaultLinkBrand'/>
<TextLayoutFormat color='#0000ff' id='hoverOverEmail'/>
<TextLayoutFormat color='#0000ff' id='mouseDownOverEmail' lineThrough='true' />

I'm also loading some embedded fonts, that's working ok.

When I apply a link to the current selection, I use this code:

IEditManager( textFlow.interactionManager ).applyLink( url, linkTarget, false);

The problem I have is that when the link is applied, the selection looses it's font family value and there is no way to re-format it again.

is it possible to declare a CFF setting in the "defaultLinkBrand" so all links keep the original font family?

any ideas will be appreciated.

This topic has been closed for replies.

1 reply

Adobe Employee
June 4, 2010

Named styles aren't supported in TLF.

Richard

oscar7878Author
Inspiring
June 10, 2010

I'm going to try to explain my problem better.

This is a screenshot of some text rendered in a Sprite container. This text uses a embedded font. All this works perfectly.

If I apply a link so some of this text, the link is applied correctly, but it looks like removes the CFF property from the text. Here's the result:

As you see, the font went back to the default font, and something else happened, some kind of internal error (no exception is thrown), because the text can no be converted back to the original font.

This is what I'm using to apply the link:

IEditManager( textFlow.interactionManager ).applyLink( url, linkTarget, false);

What I need to do is find a way to preserve the embed font after the  link is applied. Any ideas?

oscar7878Author
Inspiring
June 13, 2010

Any one from Adobe? please