Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Embedded CFF Fonts in an AS3 only Flash Project

Community Beginner ,
Jan 08, 2010 Jan 08, 2010

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

TOPICS
Text layout framework
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 08, 2010 Jan 08, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 11, 2010 Jan 11, 2010
LATEST

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


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines