code: private void shapeArabic(int digitsDir, int lettersDir) {
          if (digitsDir == lettersDir) {
              shapeArabic(shapingOptions | digitsDir);
          } else {
              /* Honor all shape options other than letters (not necessarily digits
                 only) */
              shapeArabic((shapingOptions & ~ArabicShaping.LETTERS_MASK) | digitsDir);
  
              /* Honor all shape options other than digits (not necessarily letters
                 only) */
              shapeArabic((shapingOptions & ~ArabicShaping.DIGITS_MASK) | lettersDir);
          }
      }
docs: Performs digit and letter shaping
  
  @param digitsDir Digit shaping option that indicates whether the text
  should be treated as logical or visual.
  @param lettersDir Letter shaping option that indicates whether the text
  should be treated as logical or visual form (can mismatch the digit
  option).