code: public int getWidth(String text) {
          int total = 0;
          if (fastWinansi) {
              int len = text.length();
              for (int k = 0; k < len; ++k) {
                  char char1 = text.charAt(k);
                  if (char1 < 128 || (char1 >= 160 && char1 <= 255))
                      total += widths[char1];
                  else
                      total += widths[PdfEncodings.winansi.get(char1)];
              }
              return total;
          }
          else {
              byte mbytes[] = convertToBytes(text);
              for (int k = 0; k < mbytes.length; ++k)
                  total += widths[0xff & mbytes[k]];
          }
          return total;
      }
docs: Gets the width of a <CODE>String</CODE> in normalized 1000 units.
  @param text the <CODE>String</CODE> to get the width of
  @return the width in normalized 1000 units