tags:

views:

128

answers:

1

I am trying to embed different typefaces of a font and have a .otf for each of them. It looks like Flex only supports 'bold','italic'. But what do I do if I want to embed 'bold-condensed', 'regular-condensed' and 'black'. How would I achieve that?

A: 

If someone else stumbles over this: You need to import the font using open-type or true-type (.otf or .ttf) and give name it differently

            [Embed(source='assets/fonts/Interstate-BoldCondensed.otf',
            fontName='interstateBoldCondensed',
            mimeType='application/x-font',
            advancedAntiAliasing='true'
            )]
        private var font1:Class;

        [Embed(source='assets/fonts/Interstate-Light.otf',
            fontName='interstateLight',
            mimeType='application/x-font',
            advancedAntiAliasing='true'
            )]
        private var font2:Class;

        [Embed(source='assets/fonts/Interstate-RegularCondensed.otf',
            fontName='interstateRegularCondensed',
            mimeType='application/x-font',
            advancedAntiAliasing='true'
            )]
        private var font3:Class;

then you'll just treat them as if they were different fonts and reference them by their 'new' name: e.g. 'interstateRegularCondensed'.

Daniel