BRT Community

General Category => Discussion - EVE => Topic started by: Cyrilou on July 21, 2021, 04:24:14 PM

Title: center text vertically with OPT_FILL
Post by: Cyrilou on July 21, 2021, 04:24:14 PM
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?
Title: Re: center text vertically with OPT_FILL
Post by: BRT Community on July 22, 2021, 03:21:14 PM
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
Title: Re: center text vertically with OPT_FILL
Post by: Cyrilou on July 23, 2021, 10:02:12 AM
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.
Title: Re: center text vertically with OPT_FILL
Post by: BRT Community on July 23, 2021, 02:31:24 PM
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