for(int k=0; k<fonts.length; k++) {
String s = fonts[k].toLowerCase();
- StringTokenizer st = new StringTokenizer(s, "-", false);
+ StringTokenizer st = new StringTokenizer(s, "-", true);
String[] font = new String[st.countTokens()];
try {
- for(int i=0; st.hasMoreTokens(); i++) font[i] = st.nextToken();
+ int i = 0;
+ while(st.hasMoreTokens()) {
+ String s2 = st.nextToken();
+ if (!s2.equals("-")) font[i++] = s2;
+ }
// limit to iso8559 until we can do I18N properly....
- if (font.length > 13) {
+ if (i > 13) {
if (!font[13].equals("iso8559")) continue;
- if (font.length < 15 || !font[14].equals("1")) continue;
+ if (i < 15 || !font[14].equals("1")) continue;
}
String name = font[1];