public char reverseMap(short glyphID) {
        // look at each segment
        for (Iterator i = segments.keySet().iterator(); i.hasNext();) {
            Segment s = (Segment) i.next();
            
            // see if we have a map or a delta
            if (s.hasMap) {
                char[] map = (char[]) segments.get(s);
                
                // if we have a map, we have to iterate through it
                for (int c = 0; c < map.length; c++) {
                    if (map[c] == glyphID) {
                        return (char) (s.startCode + c);
                    }
                }
            } else {
                Integer idDelta = (Integer) segments.get(s);
                
                // we can do the math to see if we're in range
                int start = s.startCode + idDelta.intValue();
                int end = s.endCode + idDelta.intValue();
                
                if (glyphID >= start && glyphID <= end) {
                    // we're in the range
                    return (char) (glyphID - idDelta.intValue());
                }
            }
        }
        
        // not found!
        return (char) 0;
    }