14 Replies Latest reply on Aug 21, 2006 8:03 PM by kglad

    Extract font from SWF

    abeall Level 3
      Is there any way to extract a font from an SWF? I don't need to use the font for anything besides other Flash/SWF files, so exporting to a system font file is not needed. I just need to be able to re-use a font that is on SWF in other SWFs, when the font is not installed on my system.

      Why I need to do this is a very unique situation. As I said I have an SWF that contains a font I need. This SWF is generated by a 3rd party application, so there's actually no FLA involved. This particular font that is being embedded is actually derived from a system font, but it is a new font. Specifically, it is modifying a font on my machine to be super/subscripted, and embedding it as a seperate font. I need that superscript/subscript modified font.

      Thanks for any tips.
        • 1. Re: Extract font from SWF
          abeall Level 3
          I should mention that I tried Eltima's and Sothink's Decompilers, and they export fonts as .swf files with textfields, so that doesn't do me any good since the textfield refers to a font I don't have in the first place, and therefor doesn't export properly if imported into a .fla. In fact, exporting fonts from both these mentioned decompilers seems completely useless in light of this.
          • 2. Re: Extract font from SWF
            kglad Adobe Community Professional & MVP
            post a link to the swf that contains the font, if you can.
            • 3. Re: Extract font from SWF
              abeall Level 3
              Sure, here it is:
              http://abeall.com/files/temp/italy.swf

              I've been talking to the creator of the app, so this is how I know that it's creating fonts internally and embedding them in SWF. He suggested to try and extract them, but wasn't sure what program could do that.

              What are you scheming to do, kglad? :-)
              • 4. Re: Extract font from SWF
                kglad Adobe Community Professional & MVP
                i as going to see if jsfl could extract the font but first i used sothink's decompiler to create a fla and it now looks like i can copy a textfield from italy.swf and paste it into any swf i want and use GQsubscriptGQ and GQsuperscriptGQ etc.

                what test would show if i'm really using those fonts or i'm just using a substitute font?
                • 5. Re: Extract font from SWF
                  abeall Level 3
                  Well, if it's a substitute font it won't be anti-aliased, it will look all jaggy. Also if the font isn't installed on your machine it will show the font as being in parenthesis, like (GQsubscriptGQ), and in my experience that has always resulted in the published SWF to have font substitution, but I supposed it's possible your FLA has the font embedded?

                  Here's how you could test it. Create a static textfield, and put this in it:
                  AAA
                  (or just make three textfields next to each other)

                  Make the first A in Arial, the second A in GQsubscriptGQ, and the third A in GQsuperscriptGQ. The second letter should be in subscript, the third letter should be in superscript. If, however, they look like three identical A's, then you know it's just being subsitituted by Arial.
                  • 6. Re: Extract font from SWF
                    Craig Grummitt Level 3
                    in case you find you need it, Action Script Viewer will extract a font from a SWF into a TTF. i haven't tested it though as it costs US$60.
                    • 7. Re: Extract font from SWF
                      abeall Level 3
                      Good find, Craig. Too bad there's no demo for v5, only v3 which does the typical and useless "export font as SWF" business. $60 dollars is reasonable, considering my fast approaching last alternative would be to get a font app and make my own font, and font apps are alot more that! Plus, working with the demos has revealed my lack of fontography skills.

                      kglad, let me know if you have any luck with jsfl if you get a chance, otherwise I'll try ASV5.
                      • 8. Re: Extract font from SWF
                        kglad Adobe Community Professional & MVP
                        no, i didn't have any luck. but why don't you use one of the free mathematics fonts that are available?
                        • 9. Re: Extract font from SWF
                          Level 7


                          abeall wrote:
                          > Is there any way to extract a font from an SWF? I don't need to use the font
                          > for anything besides other Flash/SWF files, so exporting to a system font file
                          > is not needed. I just need to be able to re-use a font that is on SWF in other
                          > SWFs, when the font is not installed on my system.

                          hit F1 key , in help search for "sharing fonts"



                          --
                          Best Regards

                          Urami


                          --


                          <urami>
                          If you want to mail me - DO NOT LAUGH AT MY ADDRESS
                          </urami>
                          • 10. Re: Extract font from SWF
                            abeall Level 3
                            Urami,
                            Thanks, the problem is I don't have the ability to set up shared assets from the source app. There's actually no FLA involved here, it's generated by a third part application.

                            kglad,
                            Free mathematic fonts? That's sounds like just what I need... I haven't found anything, though, can you tell me more? One issue is that I can't really use Unicode characters(Microsoft San Serif provides 1-0 and some other characters in sub/sup), because otherwise it doesn't work cross platform in HTML text(TextField.htmlText).

                            My end goal is to be able to take a string from an XML node like this:

                            <p>E=mc<sup>2</sup></p>

                            And have it work in a dynamic textfield. To do this, the best solution I can think of is to make a sub/sup font face, and simply find and replace <sup> and <sub> tags with <font> tags, so the above would become:

                            <p>E=-mc<font face="ArialSuper>2</font></p>

                            Kind of ugly in the sense that you have to embed multiple font faces just to get sub/sup abilities, but nothing else I've tried has made me happy either. This seems like the least evil I can find thus far, untill the SWF format/Player supports dynamic sub/sup.
                            • 11. Re: Extract font from SWF
                              kglad Adobe Community Professional & MVP
                              there are several free math fonts. check google under free latex math fonts.
                              • 12. Re: Extract font from SWF
                                abeall Level 3
                                Ah, not sure how I missed those, a search for "mathematical fonts" turns up quite a few as well. Interesting. Thanks.
                                • 13. Re: Extract font from SWF
                                  Level 7
                                  On Sat, 19 Aug 2006 02:23:36 +0000 (UTC), "abeall"
                                  <webforumsuser@macromedia.com> wrote:

                                  >Is there any way to extract a font from an SWF? I don't need to use the font
                                  >for anything besides other Flash/SWF files

                                  I'd suggest to go here: www.flashdig.com
                                  You can export Font Object into a reusable format and then use in
                                  other SWF file by importing this object. It does just what you are
                                  about.

                                  But please note that your font should have all characters you need to
                                  write a new text! Otherwise you'll not get any good result.

                                  • 14. Re: Extract font from SWF
                                    kglad Adobe Community Professional & MVP
                                    you're welcome. there are several free math/science text editors too that use latex.