@Override
    public int getWidth(final String str, final float size) {
        // Note: This is supposed to return the width of the String when scaled
        //       with the size factor. Since I don't know how to do that with
        //       the font rendering in jme this will only work correctly with
        //       a size value of 1.f and will return inaccurate values otherwise.
        return getWidth(str);
    }
get font width of the given string.
@param str text
@return width of the given text for the current font
jme3-niftygui/src/main/java/com/jme3/niftygui/RenderFontJme.java