X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FPOSIX.java;h=d5228343e721b631ef17ba57fcc471eb23643299;hb=38c7cb80528704b6771220448f36da4199f66453;hp=0be6ced3bf70637c2a6890d5b92d133749f5d030;hpb=80b1c566e72f8c30cf29da35f2ae918d7cee93d7;p=org.ibex.core.git diff --git a/src/org/xwt/plat/POSIX.java b/src/org/xwt/plat/POSIX.java index 0be6ced..d522834 100644 --- a/src/org/xwt/plat/POSIX.java +++ b/src/org/xwt/plat/POSIX.java @@ -52,14 +52,14 @@ public class POSIX extends GCJ { protected native void eventThread(); private native void natInit(); - /** returns the $BROWSER environment variable, since System.getenv() is useless */ - private static native String getBrowserEnvString(); - + /** returns the value of the environment variable key, or null if no such key exists */ + protected native String _getEnv(String key); + /** spawns a process which is immune to SIGHUP */ private static native void spawnChildProcess(String[] command); protected void _newBrowserWindow(String url) { - String browserString = getBrowserEnvString(); + String browserString = getEnv("BROWSER"); if (browserString == null) { browserString = "netscape " + url; } else if (browserString.indexOf("%s") != -1) { @@ -256,6 +256,7 @@ public class POSIX extends GCJ { public void initFonts() { // use the font list to build nativeFontList String[] fonts = listNativeFonts(); + for(int k=0; k 13) { + if (!font[13].equals("iso8559")) continue; + if (font.length < 15 || !font[14].equals("1")) continue; + } + String name = font[1]; String size = font[6]; - String slant = font[3].equals("i") ? "i" : ""; + 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);