Re: Fonts (was: sorry about that!)
- Posted by Jeff Zeitlin <jzeitlin at CYBURBAN.COM> Jan 02, 1999
- 373 views
On Sat, 2 Jan 1999 00:00:04 -0500, Norm Goundry <bonk1000 at HOTMAIL.COM> wrote: >Happy New Year! >I think that it is appropriate that I also state that the discussion of >the pro and con rant about encryption is out of place here, and that I >apologize to anyone who's feelings I have hurt. That includes you, = Jeff. No hard feelings. Even here in the states, the subject generates a lot of heat and very little light. That's one of the reasons I decided to try to become informed on the matter. >It is true that many of us do not live in the USA and are content to >remain where ever we are, such as myself. That being said, I wonder >if anyone out there can give some advice on creating (or concatenating) >font files into a set larger than 0-255 chars. And how could this be >editted? The reason I ask is that I have also created a humungo' >chinese-japanese-korean to english character and phrase translator >(which I use to translate very old classical chinese written works) and >about six months ago finished porting it over from my ancient, yet >beloved Amiga. I initially used Jiri's wonderful font tools and sets. >However, it would not allow the inclusion of more than about three full >fonts (32X32 pixel) without turning into a tortoise. I do not mean this >as any sort of criticism to Jiri, as what I am doing is very much out >there on the edge of things; not normal. I should explain that the full >running set is using over 214 full fonts when it is running! So it >requires over 16-bit character designation, i.e., fonts running from = AA.f >to GG.f and a slight bit more. Unicode is useless for this, as it just >names characters to a position (it is a protocol standard). As I used = to >do on the Amiga, I automatically generate a RAM-DRIVE at bootup (win95 >and win98, depending on which harddrive I am using that day) and dump = the >scores of font files into with a BAT file. These files are used by by = my >program one at a time, each time being installed and then de-installed; >very hard on the run-time as there are sometimes up to four or five = files >needed to pick chars from to display the needed phrase on the screen. I >am using 4 megs of vidio ram, 64 megs of memory, a 300 mhz cpu, and this >still is far, far slower than what my old Amiga does with a 68000 = Motorola! >Any suggestions? Well, you don't say how the various symbols are organized in your fonts, but the sheer number of fonts involved suggests to me that they may not be organized in the most efficient manner. If I'm wrong, I'd be interested in more detail; I find this sort of thing fascinating. As far as you application goes, all I can say is _wow_! However, I discovered a little bit of a trick to Korean that may make things easier for you - the written language is (or at least can be treated as) essentially alphabetic, albeit with funny kerning rules. (I refer the hangul, not the hanzi.) As a result, all of the hangul components (I think they're usually called 'jambos') can fit nicely into a single font. I also know that the two kana sets (katakana and hiragana) for Japanese can together fit into a single font, or, worst case, two fonts. The kanji, again, are the problem. If I recall correctly, and this is where I am 'foggiest', the Chinese ideograms, Korean hanzi, and Japanese Kanji are all the same - the same stroke combination means the same thing in all three languages, even if the way they're _pronounced_ is different. That's a space saver, as you don't need separate fonts for hanzi, kanji, and Chinese. Simplifying the Chinese part of the problem is the bear. If I recall my readings about the language properly, one only need to know about 800 basic ideos to be able to function day-to-day, and even highly educated Chinese only know about 2000. The implication of that is that you can minimize the amount of font swapping that you do by putting the most common ideos into fonts together. Add to that a little judicious cache-management techniques (like tossing out the least-recently-used font when you need to load a new one), and you can probably take a big bite out of your performance problem. All this may not be much direct help, and may not be sufficient to satisfactorily address your performance problems, but they should be of some help. If they're not, more detail on the problem would be appreciated. -- Jeff Zeitlin jzeitlin at cyburban.com