dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: bold, italic and bold/italic won't embed

  1. #1
    Senior Member
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    326

    bold, italic and bold/italic won't embed

    I've imported four fonts into the Library and used Linkage to enable Export for Actionscript. The fonts are the four versions of Trebuchet MS:

    Trebuchet MS
    Trebuchet MS Bold
    Trebuchet MS Bold Italic
    Trebuchet MS Italic

    They are named like this in the Library and for example the 'Bold Italic' version has both 'bold' and 'italic' selected in its properties.

    Then I drew a dynamic textfield and selected for it's font 'Trebuchet MS Bold Italic*' so that the embed font was used. I also embeded the glyphs for 'Basic Latin' and 'Latin 1'.

    Then I used this code to fill it with text:
    Code:
    my_txt.embedFonts = true;
    my_txt.text = "This is a sample";
    The text is placed, however, it is always in the Trebuchet MS regular font. Also when I click the bold and italic icons in the Property Bar, the font won't go bold/italic. The same for just bold and just italic. It only turns bold/italic when I delete all font symbols accept the Bold Italic one.

    Am i doing something wrong in embedding fonts? See attached file.
    Last edited by digitalecartoon; 08-19-2009 at 04:49 PM.

    Illustration | Animation | Web Banners | Graphic Design
    Ducklord Studio

  2. #2
    Senior Member
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    326
    Here's the same file. All I did was change the file names. In the Library and also the corresponding Linkage name:

    From:

    Trebuchet MS
    Trebuchet MS Bold
    Trebuchet MS Bold Italic
    Trebuchet MS Italic

    to:

    Trebuchet_Normal
    Trebuchet_Bold
    Trebuchet_Bold_Italic
    Trebuchet_Italic

    Now I can choose either of these fonts in the Property field:
    Trebuchet_Normal*
    Trebuchet_Bold*
    Trebuchet_Bold_Italic*
    Trebuchet_Italic*

    Initially they display the textfield in the 'Normal' font, but I can select Bold and Italic to change it.

    Can someone explain this? Is it a Flash bug or am I using a way of embedding fonts that is wrong?
    Last edited by digitalecartoon; 08-19-2009 at 04:49 PM.

    Illustration | Animation | Web Banners | Graphic Design
    Ducklord Studio

  3. #3
    Senior Member
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    326
    Some more testing has led me to these files.

    They are almost identical. The text in each field show what style it should be.

    Corembed1.fla = the linkage name of Trebuchet MS in the library = Font1

    This works correctly.

    Corembed2.fla = the linkage name of Trebuchet MS in the library = Trebuchet MS

    This shows all fields in 'regular' style.

    That's the only difference. All fields use Trebuchet MS* as the embeded font. Styling is done using the bold/italic buttons. But it doesn't make a difference when I use the other 3 embedded fonts with a * sign behinds its name.

    Some more testing: in both files I also use embedded glyphs by using the embed button in the properties window. When I deselect all embedded glyphs so no glyphs are embedded, suddenly Corembed2.fla starts to work too?

    Did I stumble on some weird Flash bug/behaviour?
    Last edited by digitalecartoon; 08-19-2009 at 04:49 PM.

    Illustration | Animation | Web Banners | Graphic Design
    Ducklord Studio

  4. #4
    Senior Member b18269's Avatar
    Join Date
    Jan 2006
    Location
    London, UK
    Posts
    167
    I find when embedding fonts and calling in external copy. Publishing in flash 8 works most of the time. For some irritating reason publishing in player 9/10 just does'nt cut it!

  5. #5
    Senior Member
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    326
    Basicaly what happens is this:

    I import font A
    I can use font A* in the font list and the text is in plain style

    I import font A with bold selected
    I can use either font A* or font A bold* in the font list and the text is in both cases in plain style. However in both case I can now turn on the bold button

    I import font A with italic selected
    I can use either font A* or font A bold* or font A italic* in the font list and the text is in all cases in plain style. However in all three cases I can now turn on either the bold or the italic button

    I import font A with both bold and italic selected
    I can use either font A* or font A bold* or font A italic* or font A bold italic* in the font list and the text is in all cases in plain style. However in all four cases I can now turn on the bold, italic and both bold/italic buttons.


    Which makes me wonder: instead of now four asterisk-named fonts to choose from (font A* or font A bold* or font A italic* or font A bold italic*) which all individually show the text in plain style, why doesn't flash give one asterisk-named font to choose, like simply font A*? And then I can still toggle the bold and italic buttons.

    Who can tell why flash does this?

    Illustration | Animation | Web Banners | Graphic Design
    Ducklord Studio

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