Characters Not Embedding With Flex DefineFont4

In a nutshell: Don’t try to use Windows TTF files when embedding fonts in Flex on OSX, possibly a CFF thing. Long version: I had a strange problem with font embedding in Flex Gumbo on OS X when trying to embed the following character ranges (using CFF): // numerals, full stop, lower, upper, punctuation, basic latin [Embed(source='ttf/arial.ttf', fontFamily='Arial', unicodeRange='U+0030-U+0039, U+002E, U+0041-U+005A, U+0061-U+007A, U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E', cff='true')] public static var Arial:Class; The first range (U+0030-U+0039) contains the numerals 0 through 9, but they were not being embedded in the resultant SWF....

February 23, 2009 · Richard

Text Layout Framework Follow Up PureMVC Solution

In my previous post I posed the problem of using the new Text Layout Framework in an application where you already have an Undo stack/mechanism, for example in PureMVC with the Undo utility (CommandHistoryProxy). The challenge arises because the TLF already has an UndoManager, so the solution must hook into that. Added to that, in an application you’re likely to need to serialize your TextFlow to disk/server, which means de-serializing it, which means you’re storing your data outside of the TextFlow instance and needing to keep this store up to date as the user interacts with the TextFlow via the EditManager provided by the TLF....

February 19, 2009 · Richard

Text Layout Framework Follow Up and Request

UPDATE: I’ve posted a solution to this PureMVC + Text Layout Framework integration here (this applies not just to PureMVC, but anywhere you want to use your own “undo” stack in an MVC application). I’m having a bit of a tricky time with integrating the TLF into an application which already has an “undo” system. The TLF has itself an UndoManager, but more on that later… The public demo’s are all quite concise, showing the functionality of the TLF in a small amount of code, but I wonder if it’s possible for someone at Adobe to take a look at how people might be using the Text Layout Framework when they have implemented their own application-wide Undo stack which I believe is quite common for RIAs now....

February 19, 2009 · Richard

Introduction to the Text Layout Framework

I’ve been using the TLF for the last day, and it’s really a major leap forward from the limitations of the TextField class introduced in Flash 6. TextField still has its uses, it’s most likely more processor friendly (unconfirmed). But if you’re in need of some of TLF’s advanced features like bi-di text (or complex script like TCY elements), support for flowing text between multiple columns and containers, better handling of in-line images, advanced styling of things like ligatures, superscript, and tracking, then TLF is for you....

February 18, 2009 · Richard

Flash Player 10 Coming to Mobile (en-mass)

Back in October 2007 I wrote a post entitled “Does Flash Lite Have a Future?” which is one of my most popular posts and it sparked some interesting comments. The main argument I had for this wasn’t that Flash Lite was going down the pan, it was simply that we didn’t need it because the full Flash Player would be suitable for mobile due to touch-screen, higher powered mobile devices and lower power requirements for our applications anyway (the argument here is that we only use a tiny percentage of the CPU for most applications now unlike before)....

February 17, 2009 · Richard

Adobe Releases Distributable Flash Lite 3.1 Player

A thorn in the side of Flash Lite has been removed. Today Adobe has released a developer redistributable version of the Flash Lite 3.1 player along with the packager tool. This greatly improves the situation of not knowing whether someone has the player, and being helpless to get them it if they haven’t. Read more here. EDIT: I just tested this on my E71 by visiting m.adobe.com (thanks Scott), it works amazingly....

February 16, 2009 · Richard

The View-Model-ViewModel Pattern

Yes, another pattern, but I’ve just come across a great post on the M-V-VM pattern and it’s a good one to share. I was introduced to the V-M-VM pattern just under a year ago by an outstanding .NET dev when we worked together on an RFID/database powered WPF application (pics), and I have to admit it worked *really* well, I was utterly convinced by this concept with regards to WPF developement....

February 16, 2009 · Richard

Upgrading Flex 3/AIR Projects to Gumbo/Flex 4

This article is about creating Flex Gumbo (Flex 4) application that run in either Flash Player 10, or AIR 1.5. I also describe how to upgrade an existing FP9/AIR 1.0 application to use the new SDK. In my case I also had to upgrade a Flex Library project so that’s also covered. Word of warning: before you jump in please refer to the section entitled “Problem: Losing Syntax Highlighting in Script Tag” near the end....

February 12, 2009 · Richard

Two AIR Applications Reviewed – GoAir and LiveQuotes

I’ve just tested out a couple of new AIR applications using PureMVC from SourceBits, they’ve built up quite a few interesting apps in their portfolio, the two new ones being GoAir and Live Quotes. GoAir is an AIR application designed to provide a desktop Gmail experience, and offline mail support (including sending email when offline, and having it actually send when it detects a connection). This one caught my eye because I also wrote an AS3 Pop3 library and hooked it up to Gmail some time ago, alas mine did not have SMTP so you couldn’t send, and the UI was basic, this one has full SMTP/POP support so you can send and receive....

January 30, 2009 · Richard

CSS and AS3: Careful with Whitespace

Small bug here, it looks like the built in StyleSheet CSS parser in Flash doesn’t use a trim() or a more complex regular expression when parsing a CSS string/file. If you’re a whitespace fan this can lead to your style properties, such as “fontFamily”, actually being indexed in the style object as “fontFamily ” (notice the space at the end). This doesn’t affect the regular dot notation access (style.fontFamily). But it can cause problems if you’re iterating through the style object....

January 23, 2009 · Richard