A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Copyright Symbol Embed Issue

  1. #1
    On it like a bonnet
    Join Date
    Jul 2009
    Location
    Los Angeles
    Posts
    2

    Copyright Symbol Embed Issue

    I can't seem to get the Copyright symbol to display with Myriad Pro. The font embeds properly and displays fine, just the © symbol won't show up. I've tried:

    - Embedding an swf with the font embedded in it with the '©' set to be included, when I export it the symbol is there.

    - Embedding the otf file for the typeface.

    - Tried embedding other typefaces otf files.


    Actionscript Code:
    FontEmbed.as:

    [Embed(source='fonts/myriad/MyriadPro-Semibold.otf', fontWeight='semibold', fontFamily = "Myriad Pro", mimeType='application/x-font')]
    public static var MyriadSemibold:Class;

    public function FontEmbed()
    {
          Font.registerFont(MyriadSemibold);
    }

    public static var MYRIAD_SEMIBOLD:TextFormat = new TextFormat("Myriad Pro Semibold", 24, 0x000000, false, false);

    Actionscript Code:
    Footer.as

    legalCopy = '©2010 Earthcolor. All rights reserved.';
    legal = label(legalCopy);

    private function label(str:String):Sprite
    {
          var cont:Sprite = new Sprite();
          var format:TextFormat = FontEmbed.MYRIAD_SEMIBOLD;
          format.size = 11;
          format.color = 0x555555;
               
          var tf:TextField = new TextField();
          tf.embedFonts = true;
          tf.antiAliasType = AntiAliasType.ADVANCED;
          tf.autoSize = TextFieldAutoSize.LEFT;
          tf.multiline = false;
          tf.selectable = false;
          tf.gridFitType=GridFitType.NONE;
          tf.defaultTextFormat = format;
          tf.text = str.toUpperCase();
          cont.addChild(tf);
          return cont;
    }


    I get the full line of text, so it seems like it's an embedding issue. Any thoughts?

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    I have attached a working example of what I think is the best way to embed a font. The copyright sign showed up here.
    Attached Files Attached Files
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    On it like a bonnet
    Join Date
    Jul 2009
    Location
    Los Angeles
    Posts
    2
    Thanks that worked! What a pain font embedding is. Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center