@Override
  public int getSize(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) {
    if (fm == null) {
      fm = new Paint.FontMetricsInt();
    }

    int sz = super.getSize(paint, text, start, end, fm);
    int offset = AndroidUtilities.dp(6);
    int w = (fm.bottom - fm.top) / 2;
    fm.top = -w - offset;
    fm.bottom = w - offset;
    fm.ascent = -w - offset;
    fm.leading = 0;
    fm.descent = w - offset;
    return sz;
  }
 @Override
 protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
   super.onMeasure(
       MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(86), MeasureSpec.EXACTLY),
       MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(80), MeasureSpec.EXACTLY));
 }