code: public TextMetrics measure(final Context2D context)
      {
          final String text = getText();
  
          final double size = getFontSize();
  
          if ((null == text) || (text.isEmpty()) || (false == (size > 0)))
          {
              return TextMetrics.make(0, 0);
          }
          context.save();
  
          context.setTextAlign(TextAlign.LEFT);
  
          context.setTextBaseline(TextBaseLine.ALPHABETIC);
  
          context.setTextFont(TextUtils.getFontString(size, getTextUnit(), getFontStyle(), getFontFamily()));
  
          double width = getStrokeWidth();
  
          if (width == 0)
          {
              width = 1;
          }
          context.setStrokeWidth(width);
  
          context.transform(getAbsoluteTransform());
  
          final TextMetrics meas = context.measureText(text);
  
          final double height = context.measureText("M").getWidth();
  
          meas.setHeight(height - (height / 6));
  
          context.restore();
  
          return meas;
      }
docs: Returns TextMetrics, which includes an approximate value for
  height. As close as we can estimate it at this time.
  
  @param context
  @return TextMetric or null if the text is empty or null