X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FPOSIX.java;h=e47cc9b3fd482cf91354800459c51d6816d95ac7;hb=6e071bf7f88e5468cbd841aa6d4dc1792ff017e1;hp=e336a0163273e2448da3c3c1115688ef882f9144;hpb=d552d57b59b5255f8bf4fcaf937367c67a9e4ecc;p=org.ibex.core.git diff --git a/src/org/xwt/plat/POSIX.java b/src/org/xwt/plat/POSIX.java index e336a01..e47cc9b 100644 --- a/src/org/xwt/plat/POSIX.java +++ b/src/org/xwt/plat/POSIX.java @@ -257,26 +257,34 @@ public class POSIX extends GCJ { // use the font list to build nativeFontList String[] fonts = listNativeFonts(); + Vector v = new Vector(); for(int k=0; k 13) { - if (!font[13].equals("iso8559")) continue; - if (font.length < 15 || !font[14].equals("1")) continue; + if (font.length > 12) { + if (!font[12].equals("iso8859") && !font[12].equals("")) continue; + if (font.length < 14 || !font[13].equals("1")) continue; } String name = font[1]; String size = font[6]; String slant = (font[3].equals("i") || font[3].equals("o")) ? "i" : ""; String bold = font[2].equals("bold") ? "b" : ""; - String tail = s.substring(1 + font[0].length() + 1 + font[1].length() + 1 + font[2].length() + 1 + - font[3].length() + 1 + font[4].length() + 1); + String tail = s2.substring(1 + font[0].length() + 1 + font[1].length() + 1 + font[2].length() + 1 + + font[3].length() + 1 + font[4].length() + 1); if (bold.equals("*") && slant.equals("*")) { nativeFontList.put(name + size, font[0] + "-" + font[1] + "-regular-r-" + font[4] + "-" + tail); @@ -293,11 +301,11 @@ public class POSIX extends GCJ { nativeFontList.put(name + size + bold + "i", font[0] + "-" + font[1] + "-" + font[2] + "-i-" + font[4] + "-" + tail); } else { - nativeFontList.put(name + size + bold + slant, s); + nativeFontList.put(name + size + bold + slant, s2); } } catch (ArrayIndexOutOfBoundsException e) { - if (Log.on) Log.log(this, "skipping incomplete font string " + s); + if (Log.on) Log.log(this, "skipping incomplete font string " + s2); continue; } } @@ -361,9 +369,9 @@ public class POSIX extends GCJ { for(int j=0; j<6; j++) i = target.indexOf('-', i + 1); target = target.substring(0, i + 1) + arg.size + target.substring(target.indexOf('-', i+1)); } + if (Log.on) Log.log(POSIX.class, "mapping font \"" + s + "\" to \"" + target + "\""); RawData ret = fontStringToStruct(target); if (ret == null) ret = fontStringToStruct("fixed"); - if (Log.on) Log.log(POSIX.class, "mapping font \"" + s + "\" to \"" + target + "\""); xwtFontToFontStruct.put(s, new WrappedRawData(ret)); return ret; }