public long getUnicodeAsLong() { long retval = -1; String s = getUnicodeAsString(); if (s.equals("")) { return retval; } // if try { retval = Long.parseLong(s, 16); } catch (NumberFormatException e) { retval = -1; } // try-catch return retval; }
/** creates new file */ public GlyphFile(File a_dir, String a_name, long a_unicode) throws FileNotFoundException { super(); m_fileName = createFileName(a_dir, a_name); init(getClass().getResource(s_emptyFileName)); setGlyphTitle(a_name); setUnicode(Long.toHexString(a_unicode)); /*int eastAsianWidth = UCharacter.getIntPropertyValue( (int) a_unicode, 0x1004); //UProperty.EAST_ASIAN_WIDTH); */ int eastAsianWidth = 5; // ?? if (eastAsianWidth == 5 || eastAsianWidth == 1) { setAdvanceWidth(k_fullWidth); } // if saveGlyphFile(); }