0 Replies Latest reply on Nov 30, 2010 10:27 AM by georgepenney

    CFFFontManager transcoding error [font embedding]

    georgepenney

      Hi there. The flash site I'm working on embeds fonts into SWFs using the [Embed] tag. We recently added a new text component that uses the Text Layout Framework, so I'm now embedding some extra fonts, marking them embedAsCff="true". However I'm having trouble compiling some of the non-roman character sets. Here is my embed statement:

       

       

      [Embed(source="../fonts/ChBold.ttf", fontName="HeadingFontCFF", embedAsCFF="true", mimeType="application/x-font", unicodeRange="U+0031,U+0036,U+0035,U+0039,U+0034[...]"]

      public var headingFontCFF:Class;

       

       

      And here's the error message:

       

      exception during transcoding: The font file:/C:/Users/.../fonts/ChBold.ttf is not usable: Invalid index = 14330

       

      I don't think the index is referring to one of the characters, as I converted it to hex and couldn't find it in my list. It's also not a line/character index in the code. For a test I stripped out about half of the characters in the unicodeRange, and the compile succeeded, but after much more trial and error I couldn't narrow it down to any one character that was causing the error.

       

      I'm just wondering if there is any documentation on this "invalid index"; I'm assuming it's an issue with the font file (we generated these ourselves), but a nudge in the right direction would be a massive help. I've scoured Google and couldn't find one example of this particular error message.

       

      Thanks,

      George