I’ve been getting questions about a possible Chinese version of WP-Cumulus almost on a daily basis ever since I posted the first version on wordpress.org. I’ve tried to reply to all of them with basically the same answer. That I’d tried to create one but failed. And secondly that although perhaps possible, a Chinese version might not be usable due to file size issues. I looked into this again today to see if I could confirm that second claim, and here’s what I found.
A little background
Flash offers two basic modes for text fields.
- Using an embedded font. Because the font is embedded into the movie, every user will see the correct font, and you will be able to rotate, animate and use transparency on the text field.
- Using a client system font. This will save a lot of file size because no characters are embedded, but as a trade-off you can not rotate, smoothly animate or dim this kind of text field.
Because animating and dimming are essential ingredients in WP-Cumulus, I find myself forced to use option 1. I’ve written a short tutorial about adding your language’s to WP-Cumulus. For most languages, this is very easy to do.
According to Flash’s font embedding dialog, Chinese ‘Simplified’ consists of 13,746 characters. Basic Latin only has 484, and still adds 27 kilobytes to the Flash movie’s file size. Theoretically, embedding Simplified Chinese would create an SWF file of over 766 kilobytes. This is why I dismissed the idea. 700 Kb is far too heavy for what is essentially a toy.
In comes Microsoft YaHei
Vista comes with a font called ‘Microsoft YaHei’, and as I found out today, that particular font actually contains all the Chinese characters. This enabled me to have another go at trying to create a Chinese version. Here’s what I did.
- I opended up the flash and set the textfield’s font to ‘Microsoft YaHei’.
- I clicked the ‘embed’ button and added ‘Simplified Chinese – Level 1′ to the selection.
- In the Tag.as file, I changed the font name from ‘Arial’ to ‘Microsoft YaHei’.
- I then published the movie.
I had copied some Chinese text (see the screenshot above, I have no idea what it means) into my test tag cloud beforehand and it was now being displayed wonderfully. Unfortunately, the resulting SWF file was 3.7 MB (that’s right, megabytes…). Putting something like that online would make your blog come to a grinding halt for the vast majority of users.
All is not lost…
I came across this post today, from which I gather that Flash 10 has introduced a new type of text element that finally allows non-embedded text to be properly animated. If this is true, a true unicode version of WP-Cumulus might become a possibility. I will definitely look into this asap.