docs: public static Bitmap textToBitmap(@NonNull final Context context, final int width,
                                        final int height, @ColorInt final int backgroundColor,
                                        @NonNull final CharSequence text, final float textSize,
                                        @ColorInt final int textColor,
                                        @Nullable final Typeface typeface) {
          Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
          Condition.INSTANCE.ensureNotNull(text, "The text may not be null");
          Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty");
          Condition.INSTANCE.ensureAtLeast(textSize, 1, "The text size must be at least 1");
          Bitmap bitmap = colorToBitmap(width, height, backgroundColor);
          Canvas canvas = new Canvas(bitmap);
          Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
          paint.setColor(textColor);
          paint.setTextSize(textSize * getDensity(context));
          paint.setTextAlign(Align.CENTER);
  
          if (typeface != null) {
              paint.setTypeface(typeface);
          }
  
          int x = bitmap.getWidth() / 2;
          int y = (int) ((bitmap.getHeight() / 2) - ((paint.descent() + paint.ascent()) / 2));
          canvas.drawText(text.toString(), x, y, paint);
          return bitmap;
      }