News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Main Menu

center text vertically with OPT_FILL

Started by Cyrilou, July 21, 2021, 04:24:14 PM

Previous topic - Next topic

Cyrilou

Hi,

If I use cmd_text to display a long text with OPT_FILL|OPT_CENTER, text is not centered on Y position in multiline mode (no \n used). I'm using a custom FONT in ram. Text is centered only on the first line of the text.
How can I do to center the entire group of lines?

BRT Community

Hi,

We tried this with Comic Sans but we were not able to see the issue (please see the attached image, which was tested on a BT817).

Were there any particular factors which seemed to cause the issue (such as a specific font or other setting)

Best Regards, BRT Community

Cyrilou

On your print screen text seems to be well centered horizontally but I don't see where is Y position of cmd_text for vertical centering.

BRT Community

Hi,
Yes sorry just realized the center point wasn't in the image,

Here it is, the blue circle is at (200,200) which is also the coordinate for the text,

Best Regards, BRT Community