Skip to main content
Inspiring
Jun 2, 2010 6:07 PM UTC
Question

Link and embedded fonts

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 is closed to new replies. Start a new post to keep the conversation going.

8 replies

Inspiring
Jun 4, 2010 5:46 PM UTC

Named styles aren't supported in TLF.

Richard

Translate
oscar7878Author
Inspiring
Jun 10, 2010 6:35 PM UTC

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?

Translate
oscar7878Author
Inspiring
Jun 13, 2010 6:43 PM UTC

Any one from Adobe? please

Translate