Flash Embed Font Unicode Range Generator

Posted on October 13, 2011 | 8 comments

First off I am not sure why I haven’t made this before. I have needed this over the years on a couple of projects. If you are embedding strings in an application and you know exactly what characters are being used this will come in handy to save on the SWF size.

You can tell Flash what glyphs of a font to embed with the unicodeRange property. Here is an example:
src: url(“/assets/fonts/Arial.otf”);
fontFamily: myArial;
embedAsCFF: true;
unicodeRange: U+0018, U+0020-U+007F;

What is not obvious is how to get those unicodeRange values. I created a web application that lets you input any text you want, in any language, and get back the correct unicodeRange for the exact glyphs in the input text.

Its called Flash Embed Font Unicode Range Generator.

Flash Embed Font Unicode Range Generator

It is a great tool to keep your SWf size down for mobile or for apps that are localizing to different languages where glyphs become large to include full ranges.

You can grab the source for the application on my github here.