Flash: smoothing characters in dynamic text fields without embedding fonts, in Japanese

I am trying to achieve smoothing of dynamic text fields in flash memory on a Japanese site. The content of these text fields is not fixed.

I don’t have the ability to embed fonts, as embedding all the characters will result in a very heavy swf file (3000kb + only for fonts). This is due to the fact that there are a large number of unique characters in Japanese (literally thousands).

In principle, any flash site using dynamic text fields has the same choice:

  • save file size and use only device fonts (without anti-aliasing)
  • load 3mb + font for the user to display smooth, smoothed fonts.

I asked some Japanese friends, and they said, "Shoganai!" (translation: "cannot be helped"). Does anyone have any ideas?

ps: unfortunately silverlight is also not an option.

+4
source share
4 answers

Really a dumb “workaround”, and I'm sure it will be reduced, but since flash.text.TextField inherits flash.display.DisplayObject, you can use built-in filters like flash.filters.Blur to blur the text in half horizontally and verticals.

This will consume a bit more CPU.

EDIT: After working a bit with CS4, I found a great way to do this without the extra CPU overhead! The result will look exactly like "static text". I believe the same will work under CS3, as I recall a similar option.

While the text is selected, in the properties select "Anti-alias" and select "Custom anti-alias". Set the thickness to 100 and the sharpness to 0. This did the trick for me!

+4
source

There are many doable things, but no one can suit your taste.

  • Upgrading to Flash 10. The problem with non-anti-aliased fonts is only windows files: linux and macOs are both device fonts with an alias. Now it works with windows from Flash 10, but you need to compile Flash 10 for it to work. This is probably the best way if you can afford to customize Flash 10.
  • Limit the number of characters you can use and insert only the characters you need. This will work with any version of Flash, but in many cases it can be impractical.
  • Refuse and use device fonts: if both of the above methods are not possible in your case, I think this is really a shouganai case.
+1
source

How about embedding a font at runtime.

You can start with device fonts when loading a Japanese font in the background. When the Japanese font loads, you call a call that updates the font to the loaded font and makes an attachment.

Check out the GAIA database for easy embedding of the embedded font at run time.

for the update part, I am writing an array that records the font and its text format. Then, when the font is loaded, it refers to an array that cyclically updates all the text fields registered on it.

Work out, it seems.

Shoganai is a cop ... Ganbatte completely! @

0
source

on top of the LiraNuna idea ....

I saw one article on a similar path, but they also sought to make disguise ... they suggested drawing a movie clip bitmap. it can also free up the processor, since your filters will only be used for initial rendering, and then you can get rid of them.

0
source

All Articles