in the this lib file , you can find the str width return function:
https://github.com/m5stack/M5Stack/blob/master/src/utility/In_eSPI.h
int16_t textWidth(const char *string, uint8_t font), textWidth(const char *string), textWidth(const String& string, uint8_t font), textWidth(const String& string), fontHeight(int16_t font), fontHeight(void);