Skip to main content
Legend
November 2, 2012
Answered

Avoiding the need to compile static content...

  • November 2, 2012
  • 3 replies
  • 538 views

Hi,

In the absence of any way to download fonts on the fly for mobile content, particularly iOS, I am forced to compile around 70MB of fonts into the app. This, needless to say, takes A Long Time. And every time I change anything, it seems to be done _again_.

But the fonts don't change...

Can anybody suggest a way to still include the fonts as compiled, embedded media but without the need to recompile them each and every time? For example, if I have them as compiled SWF CSS, can I embed those in a way that will avoid the need to tie up my "Build workspace" task?

Thanks,
G

This topic has been closed for replies.
Correct answer Gaius Coffey

Yes, that did it.

1. Create library project with a single component defined that includes an <fx:Style /> with my mammoth font stylesheet
2. When build workspace completes, add the .swc to /libs folder of the dev projects
3. Delete references to fonts in dev projects
4. Set a static var on my main app class to the class containing all my fonts
5. Done.

G

3 replies

Colin Holgate
Inspiring
November 2, 2012

I'm guessing that you don't use Flash Pro, which has incremental compiling, where within each session you don't have to recompile the fonts or MP3s on each test movie. There is incremental compiling in Flash Builder 4.6, but I can't easily tell from searching if that includes caching the fonts.

Legend
November 2, 2012

I'm using Flash Builder 4.6 that _also_ should have incremental compiling and it does, to a point, but it seems to do a full recompile before every export which has become dramatically longer since I increased the number of fonts from 20 to 371...

I'm wondering whether I can compile the fonts into an SWC library and then use the SWC rather than a library project in my definition? I'll try it once the current compile completes... which may be a while... based on past performance.

G

Gaius CoffeyAuthorCorrect answer
Legend
November 2, 2012

Yes, that did it.

1. Create library project with a single component defined that includes an <fx:Style /> with my mammoth font stylesheet
2. When build workspace completes, add the .swc to /libs folder of the dev projects
3. Delete references to fonts in dev projects
4. Set a static var on my main app class to the class containing all my fonts
5. Done.

G