Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 4 of 4

Thread: CS5.5 Font embedding horror (bug, not "does anyone know how to embed fonts?")

  1. #1

    Font embedding horror [bug]

    I am using three fonts of the Helvetica typeface,
    embedding them with the embed metatag, font files inside project, openType.

    I noticed that for some reason the bold font looks identical to the roman font.

    After 4 hours of ____, and testing with five fonts, it turns out that:

    if i change the name of all the font files at once, and change the reference to them in the code, all of the fonts work the first time i publish. the second time i publish (without any changes except pressing publish a second time) some fonts overwrite others, randomly, for instance :

    roman looks like roman
    bold looks like roman,
    light looks like roman,
    black looks like black,
    rounded looks like black.

    could be anything, i cant predict what will overwrite what.

    the only way i can make sure that flash embeds all of the fonts, is to change *all* of their names and publish.

    additional info:
    second time i publish the swf filesize is much smaller than first time ( -flash really doesn't embed anything)
    traces to which fonts are registered show all fonts are there,
    no errors
    using distinct fontnames
    publishing cache disabled
    restart doesn't help

    flash cs5.5
    fdt 4
    flex 4/air 3 sdk
    windows 7

    The problem isn't critical since i found the workaround, but it was/is so annoying, and i'd really be happy if anyone knows what could it be, even if i find out after i finish.


    Thanks people
    Last edited by magarik; April 12th, 2012 at 03:17 PM. Reason: forgot to subscribe

  2. #2
    1,391
    posts
    Registered User
    i *think* that this is related to the TFLTextFields - are the fields TFLs? if i remember right, there was something about the order of instantiation that isn't quite right/with a generated swc file (?) or something - i think that there is a solution but it's a bit messy - as a result i think most people don't use them, opting for a regular ole classic field instead - save the headache

    here's something
    http://stackoverflow.com/questions/6...h-tlftextfield

    this one has loads of info
    http://www.stevensacks.net/2010/05/2...h-loaded-swfs/

  3. #3
    because it's the same typeface, even thought you've embedded each version (bold, italic, etc) when you set your text try setting:

    for bold
    yourTextField.htmlText = "<b>"+whatever+"</b>";

    for italic
    yourTextField.htmlText = "<i>"+whatever+"</i>";

  4. #4
    Thanks for the replies, but both solutions wont work -
    1 i used normal textfields created at runtime
    1a size of swf different at export - meaning problem at embed level

    2 i used for testing 5 fonts of the same typeface, only one of them was bold and theoretically could be referenced with <b>
    i embedded them with unique names, and all as fontweight:normal, fontstyle:normal,
    since flash was giving me transcoding error when i tried to declare the bold font as bold

    i cant think of anything that could behave this way other than cache related bug, since publishing a 2nd time changes things...


    So far i solved it by making a separate swf for fonts, making sure they were allright once, and then i dont touch that swf when i keep working on the main program. still very annoying bug

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012