private void setWidth() {
        float missingWidth = 0;
        float ascent = 0.0f;
        float descent = 0.0f;
        if (fontDescriptor != null) {
            if (fontDescriptor.getMissingWidth() > 0) {
                missingWidth = fontDescriptor.getMissingWidth() / 1000f;
                ascent = fontDescriptor.getAscent() / 1000f;
                descent = fontDescriptor.getDescent() / 1000f;
            }
        }
        if (widths != null) {
            float[] newWidth = new float[256 - firstchar];
            for (int i = 0, max = widths.size(); i < max; i++) {
                if (widths.elementAt(i) != null) {
                    newWidth[i] = ((Number) widths.elementAt(i)).floatValue() / 1000f;
                }
            }
            font = font.deriveFont(newWidth, firstchar, missingWidth, ascent, descent, cMap);
        } else if (cidWidths != null) {
            // cidWidth are already scaled correct to .001
            font = font.deriveFont(cidWidths, firstchar, missingWidth, ascent, descent, null);
        } else if (afm != null) {
            font = font.deriveFont(afm.getWidths(), firstchar, missingWidth, ascent, descent, cMap);
        }

    }