Embedding Japanese fonts for a flex application

The most reliable way to implement  Japanese fonts at runtime in a Flex application is to compile the font case as a swf using mxmlc. This permits you create a filter for the font case you want to implement and load the requisite font case swf. In my case I needed to be able to switch between Latin fonts and Japanese fonts depending on the country locale. This method was used for an FDT5 flex project. The development environment is Linux Mint Maya KDE.

The steps are as follows. You will need a terminal to do this:

Create an environment part to the mxmlc compiler in your Flex SDK

  • export PATH=${PATH}:/home/ayo/Toolbox/SDKs/3.50.12683/bin
Put the instructions below in the terminal, changing the path in the instructions below to your own *.css document.
  • mxmlc -managers=flash.fonts.AFEFontManager /MyClasses/css/navigation_jp.css.
Inside my *,css document this was the @font-face instruction I used for japanese fonts in my style sheet

  • @font-face {    src: url('../assets/fonts/ARIALUNI.TTF');font-family: Arial;    advancedAntiAliasing: true;
      unicode-range: 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;
    /*     , U+4E00 -U +9FFF, U+30??, U+FF00 -U+FF9F; */
}

0 comments:

My Instagram