Eric Kolotyluk wrote:
>I just thought of a really nice tool Apple should write called Java Font
>Test. You could run it and it would verify if you can run a Java
>application that will not crash because of font problem.
Why should Apple do this?
I'd rather have Apple concentrate on fixing Java so it won't crash, no
matter what kind of malformed, damaged fonts are given to it. They're in a
position to do that, which no one else is.
A third party can write Java Font Test. It could be me, or even you.
In fact, several months ago a friend of mine asked me to write just such a
thing, though it was in reference to crashing a non-Java program (I forget
what, but it was something like Photoshop, as I vaguely recall). What he
wanted was to automate the manual procedure of moving fonts in and out of
the relevant Fonts folders, running the app, seeing the crash (or not), and
eventually narrowing down the problematic fonts. A simple algorithm,
mind-numbing manual drudgery, and so a perfect candidate for automation.
The app used as the probe (crash or not crash) can be arbitrary.
The hunting procedure is always the same: classical binary search.
The only tricky things are:
1. It's not a plain simple binary search, because there may be multiple
results (i.e. more than one font that causes a crash). This is pretty easy
to deal with.
2. It may be a combination of fonts that crashes, while each one works
fine on its own. This is somewhat more difficult to handle without causing
a combinatorial explosion.
I didn't write the bad-font hunter app because I was scheduled to start a
new gig soon, and because he found the offending font pretty quickly. He
drastically narrowed the initial hunt by moving out only recently installed
fonts, as determined by comparing to a known-good backup.
It'd make a nice term project for an intermediate CS class, because it's a
nice mix of a straightforward algorithm that involves real-world actions
like moving files around, controlling other apps, and detecting crashes.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden