Sign In  Sign Up Live-Chat

embedding fonts in swf

Last post 04-07-2008, 11:43 AM by alcrus. 5 replies.
Sort Posts: Previous Next
  •  03-30-2008, 8:44 AM 119766

    embedding fonts in swf

    Hi ,

    I am creating a flash application that wants to call upon many font styles.  In order to not make the initial SWF huge we are going to call the fonts at run time.

    I am looking for software to create the SWF that has the font embedded in it, dynamically with server side code.   Does ASPPOST offer this functionality ?

    Thanks!

    Mike

     
  •  03-31-2008, 6:41 AM 119841 in reply to 119766

    Re: embedding fonts in swf

    Dear Mike,

    Thanks for considering Aspose.Flash.

    I think, it is only possible with action script because swf files stores the actual GLYPHS rather than just the font name. Aspose.Flash allows you to inject action script code into existing swf files. However, I have requested the technical team lead to help you in this regard and he will help you as soon as possible. Thanks for your patience.


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  04-01-2008, 11:02 AM 120110 in reply to 119841

    Re: embedding fonts in swf

    Hey Guys,

    Any update ?  Need an answer ASAP


    Thank you,
    FlashMike

     
  •  04-01-2008, 11:46 AM 120122 in reply to 120110

    Re: embedding fonts in swf

    Hello,

    You know, flash can show 2 types of text: static and dynamic.
    Currently Aspose.Slides works mostly with dynamic text. You can use plain text or html formatted text. In this case fonts installed on the computer will be used.
    We did some work for creating static text automatically with embedded fonts. Please check Aspose.Flash.Text.TextManager class. But unfortunately it is not finished and doesn't work as necessary in most cases. I only should tell, Aspose.Flash gives you access to all "text" tags like glyphs and fonts descriptions and etc. so in theory you can use it for text generation. That is not simple tasks and you have to fill all these tags by yourself. And you should have good knowledge of text tags of course.

    If I understood right, dynamic text is not suitable for your application?

    Alexey Zhilin
    Lead Developer
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  04-07-2008, 11:04 AM 121033 in reply to 120122

    Re: embedding fonts in swf


    Hi Alexey,

    I am not overly experienced with flash, but I am a competent .NET developer.  Please let me explain in more details what I am trying to accompish, in co-operation with my flash developer.

    My Flash developer is creating a flash application, in which we want to have many fonts available to the end user.  The list of fonts will appear in a dropdown list, and the user will be able to select which font they want to work with.  If the user wants to work with multiple fonts, they are able to.  For example if they want to type one string on "font-A", then create another textbox with a textstring in "font-B" they are able to.

    I have been recommended by my flash developer to make the flash application embed each font on the fly, so that the flash application is a more manageable size etc.


    With the flash application, we are creating textboxes that the user populates with text of their choice.
    We want the text in the flash application to automatically appear in the desired font as the user types it.  I am guessing this is dynamic strings? 
    The reason we are doing this, is to emulate what the image (JPG|GIF|PNG) will look like, when it is created dynamically by the server side code.

     

    Here below are specific instructions from my flash developer, and should help to further understand what we are doing.


    Following http://oddhammer.com/index.php/site/comments/shared_fonts_for_flash/

    Embedding of font "Abduction.ttf" example


    "For each font you want to share/embed, you have to create two SWFs. One contains a MovieClip (set to export for runtime sharing) that contains a TextField with any text and the embedded font in it. We'll call this one 'font_abduction_shared.swf'.The other contains that shared symbol on the timeline  and we'll call it 'font_abduction_imported.swf'.
    Name of the textField object inside of "font_mc" of font_abduction_shared.swf should be "text_txt".
    Name of the MovieClip inside of 'font_abduction_imported.swf' should be "font_mc". Theese points are critical.

    Please see also http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14767&sliceId=2


    Please let me know your thoughts, and if you think ASPPOSE.FLASH is an application that can do what I need it to.  If not, any recommendations are also greatly appreciated :)

    Thanks,
    FlashMike

     
  •  04-07-2008, 11:43 AM 121039 in reply to 121033

    Re: embedding fonts in swf

    Hello FlashMike,

    Thank you for the explanations. I see now your requirements.

    Unfortunately, Aspose.Flash can't embed ttf fonts to swf movies. Although there is possible workaround. You can create swf files with embedded font in Flash Studio (or somewhere else). One swf per font. Later you can on the fly read swf with font using Aspose.Flash and copy font data to your flash movie. It's possible to copy several fonts. You only have to allocate new identifiers for these fonts and change ids of fonts in text objects.

    Alexey Zhilin
    Lead Developer
    Aspose Tyumen Team
    About Us
    Contact Us
     
View as RSS news feed in XML