How do I find out the maximum number of visible characters in a text widget?

Hello everyone
I’m new to Unreal. Came with Unity.
You can offer solutions in Blueprints and C++

The following questions are attached:

  • I use a mono-sized font
  • I need to automatically split the text into pages and therefore I want to know how many visible characters to fit in a text widget.

There are a few questions:

  1. How can I get the maximum number of visible text characters in a text widget? For example, a text field with dimensions (x:500, y: 500) accommodates so many visible characters.

  2. How do I get the dimensions (x,y) of any widget relative to canvas? For example, the size of an empty text field. ( ( In Unity - rect\rect transform)

  3. How can I get the size of one character (x,y)?

It will be cool if you can suggest an answer or direction in search of an answer to one of the above questions.

Thank you for your help!

I could be wrong, and you may get a better answer, but to my knowledge I don’t think there’s a good way to get the exact size of a character. Mainly due to the fact the size can vary depending on the font size, anchors, text box size, and with certain settings (Size to Content).

You’re probably better off setting the dimenstions, spamming keys until it fills up the box and then counting the number of characters that fit. Make sure to set “Auto Wrap Text” to true to make sure all of the text doesn’t stay on one line.