Flex application & new fonts
June 30, 2009 at 5:21 PM | In Flex / AS, Internet, Programming | Leave a CommentTags: dynamic font, embed, flex, font, recompile, swf
A typical requirement was to provide some means so that anyone can upload / add new font(s) and the same can be used by Flex application. The Flex project should not require recompilation process.
Font, as a TTF or FON file cannot be used unless embedded, but that requires recompilation.
Searching around net gave me a way to solve this gave me a reasonable good solution.
Instead of specifying external styles such as <mx:Style source=”assets/styles/fonts.css”/> I used StyleManager.
Any change in fonts.css requires project recompilation to get the change in effect.
So, I compiled fonts.css using mxmlc fonts.css . This compiled CSS to SWF.
Then I loaded fonts at runtime using StyleManager.loadStyleDeclarations(“fonts.swf”, true, true);
And that’s it….! The font(s) inside fonts.swf can be used and that gives the same effect as embedded.
No Comments Yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Navigate
-
Recent Posts
-
Top Posts
- Ad Hoc Wireless Networking with Ubuntu
- Simple solution to a complex problem - customized Rich Text Editor
- Online Forms : Wufoo v/s Google Forms
- Wake Up call for Indian Consumers
- Flex (Flash Player) - DPI and input/output
- alpha & rotation issue for textArea with htmlText
- Flex application & new fonts
- Bus time table - an SMS away!
- Font transcoding error - specify font style
- AXIS Bank website & services – reviews & suggestions
Blogroll
Gujarati
RSS
Visitors
Archieves
Tags
actionscript adobe ahmedabad bihar bsnl bug Camera celebration code css digital eclipse email firefox flex flex 3 flex 4 flex sdk font fwd Google gujarat harit kothari home icici image India Internet ip IT jain jharkhand magazine Management mozilla network Photography Programming sdk Security sms Story twitter university VacationCategory Cloud
-
Recent Comments
‘Post’ Calendar
-
Blog Stats
- 10,246 hits
Current Visitor Count

Tweets
- experiencing gmail very slow with standard view! :( written 3 weeks ago
- wishing all netizen friends a very happy diwali! :) written 3 weeks ago
- RT @b50: US prints money. China buys that money. That's pretty much the global economy. written 3 weeks ago
- @satishkikani according to what i found, @firefox 3.5 supports HTML5. http://is.gd/4mcgE http://is.gd/4mcH4 http://is.gd/4mcHN written 3 weeks ago
- @aminan4u :( bt, thanks for pointer written 3 weeks ago
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.
