Support for multiple fonts / languages ​​in Flash

Hello,

I am in the middle of writing a Flash application that supports multilingualism. My initial font choice for this was Tahoma, for its Unicode support. The client prefers a custom font, such as Lucida's handwriting. Lucida Handwriting does not have the same, say, Cyrillic support as Tahoma, which creates a problem, that there are several solutions, and I would like to ask your advice on which this is desirable:

From what I understand, I could:

  • Provide your client with a list of fully Unicode-compatible fonts (Cyrillic, Hebrew, Arabic, Traditional Chinese, East Asian, etc.) to choose from. (I don’t know where to get such a list; my search on the Internet only led to lists of partially Unicode-compatible fonts. Try http://look.fo/list-of-unicode-compliant-fonts as a good starting point to see where I look).
  • Depending on the location of the client (which we already have), visualize in Lucida Handwriting for English-speaking users and in Tahoma for international users. It could be a headache; Does anyone have experience with this approach?
  • Create a new font (IE, AlexeyMK Bold) that uses Lucida Handwriting for English and Tahoma for everything else. This ad is about 500 by weight of the Flash file, but should (if I understand correctly) only load for the first time.

What do you advise? Which of these are reasonable decisions and which fully exist? Is there a way that I don't think about?

Thank you very much! Alexei

EDIT: A good related article: http://www.itworld.com/print/58558

+4
source share
1 answer

Well, in the end, you have only two real options: either you insert the font into SWF, guaranteeing how your fonts will look or not, and use the device fonts. (Or a mixture of the two, using embedded or device fonts depending on the region.)

If you don’t insert any fonts, then any font that you define for your text is ultimately just a suggestion - what the user sees are device fonts that are displayed by their own machine (using fonts on this machine) . Thus, you can “suggest” Tahoma, but what the user sees will depend on whether they have this font (and it can vary, for example, for Mac versions for font versions and PCs). Naturally, this also depends on support; if they do not have Asian fonts, then they will not see a single Chinese, for example. (Note: you can also choose a font, for example "_sans", which simply tells the client to use the standard sans-serif font. I assume that in practice this will be the same font that would be selected, d is defined by "Tahoma", but YMMV .)

If you insert your fonts, the user will see exactly what you expect from them, because the font is displayed by Flash, not the OS. But if you fully implement all the regions, including the glyphs necessary for the Chinese, then I think you will find that it adds significantly more than 500K .. more like 2-5MB in my experience. But maybe there are some details that I miss. In any case, for content to be delivered over the network, I would suggest that, at a minimum, Asian fonts should be device fonts.

To add a word about a mixed solution, I did it and it is doable. That is, assuming that you can add logic to SWF, you could (for example) make two of each text field using the built-in "Lucida whatever" and the other without the built-in "_sans", and then they are invisible at runtime and put the text in a different one, depending on which region you show. (I did this by creating one LocalizedTextfield component and reading the locale from the static property when it was initialized.) Then you just need to decide, for each locale, whether the file size is worth this particular set of glyphs.

Last word: you cannot necessarily assume that the file size created by your fonts will be downloaded only once. If you make your content in an easy way and embed fonts in your text fields, the font information will be part of your SWF and thus be loaded every time, no matter what. For externalization, you can make the Label component a separate file, and then decide whether to download it or not, depending on the browser caching settings. You can also internalize the font resource itself and use it as a shared resource, but in AS2 it's a little hairy to work. I heard it easier in AS3, but didn’t do it myself.

+2
source

All Articles