public GlyphText addText(String cid, String unicode, float x, float y, float width) {

        // keep track of the text total bound, important for shapes painting.
        // IMPORTANT: where working in Java Coordinates with any of the Font bounds

        float w = width;//(float)stringBounds.getWidth();

        float h = (float) (font.getAscent() + font.getDescent());

        if (h <= 0.0f) {
            h = (float) (font.getMaxCharBounds().getHeight());
        }
        if (w <= 0.0f) {
            w = (float) font.getMaxCharBounds().getWidth();
        }
        // zero height will not intersect with clip rectangle
        // todo: test if this can occur, might be legacy code from old bug...
        if (h <= 0.0f) {
            h = 1.0f;
        }
        if (w <= 0.0f) {
            w = 1.0f;
        }
        Rectangle2D.Float glyphBounds =
                new Rectangle2D.Float(x, y - (float) font.getAscent(), w, h);

        // add bounds to total text bounds.
        bounds.add(glyphBounds);

        // create glyph and normalize bounds.
        GlyphText glyphText =
                new GlyphText(x, y, glyphBounds, cid, unicode);
        glyphText.normalizeToUserSpace(graphicStateTransform);
        glyphTexts.add(glyphText);
        return glyphText;
    }