-
1. Re: use specific font, swf size too big
Andrei1 Oct 12, 2011 4:12 AM (in response to eprevot123)"I saw I can load the font dynamically, but I need it everywhere in the application, from the home page, so I don't know if it's a good idea."
Once font gets into application domain - you can use it everywhere in your swf
"Do you know if there is a way to just embed one size of this font ?"
Fonts do not have outlines of different sizes - this is the very idea of computer fonts. Size is relevant at runtime only when it is drawn on screen.
-
2. Re: use specific font, swf size too big
eprevot123 Oct 12, 2011 4:32 AM (in response to Andrei1)Once font gets into application domain - you can use it everywhere in your swf
What I meant is I think you load fonts or other assets dynamically when you don't need it at starting or every time. For example you need the font just if the user clicked some button so you prefer to delay the loading time to when it is needed. Or you have several fonts for several locales, so you just load the one you are interested in when the user changes the locale. But here I would load the font at the starting of the application. Tell me if I'm wrong but in this case, the application won't display faster if I load dynamically the font swf at the application initialization.
Have you heard about font bitmap ? could it help and how ? (the font I use now is .ttf and 500k)
-
3. Re: use specific font, swf size too big
Andrei1 Oct 12, 2011 4:43 AM (in response to eprevot123)Your main application will load faster. Although all-in-all load time (and application initialization) will be reduced a bit (multiple requests for smaller files is a faster approach than one bulky file), still, aggregate size will be the same.
This looks strange to me that the font containing latin characters takes 500K. You should definitely restrict char ranges to only ones you use.
-
4. Re: use specific font, swf size too big
eprevot123 Oct 12, 2011 7:45 AM (in response to Andrei1)something weird : the .ttf is 500k but the swf file is 1300k bigger when I embed the font...
Anyway, I used the unicodeRange parameter on the embed font, and it's much better : the swf size falls from 1300k to 360k
I still have to try to load dynamically to see if loading is faster.
thanks


