1 Reply Latest reply on Sep 29, 2007 9:15 AM by pajaroplus

    Dynamic & Static TextField Embedded Font + CSS + HTML, please help

    Big_D0g
      Hi Everyone;

      ActionScript 3.0 + Flash 9

      I'm having trouble with embedded fonts and dynamic textfields when static text is on the stage using the same font.

      From the many forums across the net, I've been able to figure out that the problem has something to do with the fact that static text-fields embed the font they are using, but only the characters used in the fields ... and that when i style dynamic text using CSS, the font-family declaration picks up the font embedded for the static fields instead of the one I added to the library.

      What I'm doing seems to be pretty strait forward -- yet it just isn't working... Someone please help.

      Here's the test scenario:
      in the library I've added a 'CG' font class of "Century Gothic" and exported for actionscript in 1st frame;
      on the stage are static textfields using "century gothic" (logo + nav)
      on the stage is a dynamic textfield that loads simple html content from external files: i.e. "<h1>title</h1><p>content</p>...",
      this textfield is styled using a simple stylesheet 'h1 { font-family: "Century Gothic"; font-size:16pt... } p { font-family: "Century Gothic"; font-size: 12pt;...} ...'
      dynamic textfield.embedFonts = true;

      = dynamic content doesn't show up at all.

      If i change the css to use a different embedded font than the one used by the static field everything works fine.

      I have to use css because the content has multiple styles (different sizes, colors, etc.), using TextFormat would be a joke.
      I have the use the same font for all text because I want the site to be cohesive.

      I don't want to change all my static textfields to dynamic textfields because even with embedded fonts & antialiasing, some monitors display dynamic text very poorly, and for something like the logo I want to make sure its nice & quality.

      There has to be workaround of some kind. The only thing I've come up with is going into photoshop and creating gif's for each of my static text fields - which seems like a rediculous hack.

      Oh FYI, I've tried adding a static & dynamic textfield (with embedded font) off stage with all characters needed - didn't work.

      there has to be a way to use an embedded font for dynamic fields that is also used by static fields, i mean common.

      ANY help please, thanks.