Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How could I calculate field width of text font characters for dynamic .x .y positioning?

Avatar

Level 1

Without getting into RTF, I'd like to simply calculate the width of text as entered into a field, so I can move another field directly adjacent to the end of the text. Character count will not work: "M" is much wider than "i".

Would the approach be to load a character width set, and iterate through the text string accumulating width?

Are those character tables accessible anywhere from JS?

Thanks in advance. MP

0 Replies