Skip to main content
AdrianParr
Known Participant
January 8, 2010
Question

Embedded CFF Fonts in an AS3 only Flash Project

  • January 8, 2010
  • 1 reply
  • 1661 views

Hi,

I am working on a Flash CS4 AS3 only project (no Flex involved) and I need to embed a font.

I am linking to the 'TextLayout.swc' to have access to all the TLF classes.

To use embeded fonts I understand I need to set the TextFlow fontLookup property.

E.g.

myTextFlow.fontLookup = FontLookup.EMBEDDED_CFF;

However, the FontLookup class that has the Public Constant EMBEDDED_CFF is in the package flash.text.engine

Where do I get this package from? Do I need to link to another SWC from the Flex 4 SDK like I did with the 'TextLayout.swc'?

If so, which SWC has this class in it?

Cheers,

Adrian

This topic has been closed for replies.

1 reply

Adobe Employee
January 9, 2010

It's part of the Player, so there's nothing special you need to link against for it. It's like a Sprite, it's built into the Player.

AdrianParr
Known Participant
January 11, 2010

Hi Robin,

Thanks for the reply.

The reason I was getting an error message was because I wasn't importing the correct Class at the top of my Document Class.

What I needed was ...

import flash.text.engine.FontLookup;

Many thanks,

Adrian