Earlier I used Flex 3 and I have a working project, where both "normal" and "bold" font weights were embedded correctly.
Now I've migrated to Flex 4.6 and I'm getting an error like "bold face is not found in the font file".
I've tried to change "bold" to "heavy", then it is compiled, but in fact only the normal font version is embedded.
I've set both minimal player and SWF version to 9 in the flex settings XML file.
And it worked before with Flex 3, and I really saw both normal and bold fonts there..
I use FlashDevelop as IDE, but in any case, AFAIU, this is just a Flex problem,. not IDE one.
Here is the code:
[Embed(source='fonts/ggsupersans.ttf', embedAsCFF="false", fontName='spSuperscript', fontWeight = "bold", advancedAntiAliasing = "true", mimeType='application/x-font', unicodeRange="U+0020-U+007E,U+00A0-U+00BE,U+0391-U+03A9,U+03B1-U+03C9,U+0410-U+044F")]
And here is the error:
exception during transcoding: Font for alias 'spSuperscript' with bold weight was not found at: file:/D:/........../fonts/ggsupersans.ttf
Probably I've found the problem reason. There was an option to use "system-font" clause in Flex3, but I don't see appropriate option in the official docs now.
AFAIU, there was an ability to use Windows typeface conversion, when "system-font" was used. But now I don't see anything but to embed the TTF file directly. But TTF file always contains only one typeface. Here is the problem. So, my question is -- is there any option to use the "system-font" clause in current Flex version?
Finally it was solved!!
Just was my misunderstanding of the error messages....
First I've got the message "systemFont is not supported".
Then I've changed it to "source='....'"
Then I've got a problem with my vertical text fields.
Then I'm googling and find "use saveAsCFF=false" and add it.
But then I'm not able to embed bold faces, as there were no such among super/subscript fonts.
Then I'm stuck...
Now I've just returned "systemFont" clause back and it works!
The real problem was in the inability to combine "saveAsCFF=true" (it's default state) with "systemFont".