BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

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

Author Topic: center text vertically with OPT_FILL  (Read 8081 times)

Cyrilou

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
center text vertically with OPT_FILL
« 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?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 742
    • View Profile
Re: center text vertically with OPT_FILL
« Reply #1 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
Logged

Cyrilou

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: center text vertically with OPT_FILL
« Reply #2 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.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 742
    • View Profile
Re: center text vertically with OPT_FILL
« Reply #3 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
Logged