Skip to main content
Participant
January 6, 2010
Answered

font embedding italic overrides normal it seems.. ?

  • January 6, 2010
  • 1 reply
  • 631 views

i was working on a project using the new TLF and embedding OTF's which all works fine except for when i add the italic font weight. because it seems to override the normal fontweight.

// Embed the fonts           [Embed(source="../../assets/MyriadPro-Regular.otf",                     fontFamily="Myriad Pro",                     mimeType="application/x-font",                     fontWeight="normal",                     embedAsCFF="true")]           private const MyriadProRegular:Class;                      [Embed(source="../../assets/MyriadPro-Bold.otf",                     fontFamily="Myriad Pro",                     mimeType="application/x-font",                     fontWeight="bold",                     embedAsCFF="true")]           private const MyriadProBold:Class;                      [Embed(source="../../assets/MyriadPro-It.otf",                fontFamily="Myriad Pro",                mimeType="application/x-font",                fontWeight="italic",                embedAsCFF="true")]           private const MyriadProItalic:Class;

Font.registerFont(MyriadProBold); Font.registerFont(MyriadProItalic);

Font.registerFont(MyriadProRegular);

am i doing something wrong? or is it a bug?

if i remove the italic embedded font and only use bold and regular it seems to work fine.

hope someone can help me shed some light on this.

This topic has been closed for replies.
Correct answer robin_briggs

I think when you embed the italic version you want to set fontStyle="italic" not fontWeight="italic". Can you try that?

- robin

1 reply

robin_briggsCorrect answer
Adobe Employee
January 6, 2010

I think when you embed the italic version you want to set fontStyle="italic" not fontWeight="italic". Can you try that?

- robin

greenysanAuthor
Participant
January 6, 2010

thank you very much that worked like a charm =)