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: Word wrapping?  (Read 7895 times)

Maxzillian

  • Newbie
  • *
  • Posts: 10
    • View Profile
Word wrapping?
« on: January 12, 2024, 11:02:21 PM »

Using a BT816 and I've come across an interesting problem. By and large word wrap works as expected, but that dastardly German language has reared its head and proving that nothing is ever simple. I've got some German words that are just ludicrously long. For instance, "Druckregelungsmagnetschalter". Nearly every other language I can get to fit on our screen, but thanks to the German tendency to turn a short phrase into a single word I've got text scrolling off either end of the visible screen.

Are there any options within the EVE engine to handle automatic hyphenation and word-wrap for situations like this? I've tried adding a hyphen at a good point within that word, but the Fill option doesn't handle or observe it. I hate to make our text even smaller because it's already on the margin of hard to read. Otherwise the only other option I have is to perhaps insert a line return into the string.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 746
    • View Profile
Re: Word wrapping?
« Reply #1 on: January 16, 2024, 02:22:27 PM »

Hello,

That's an interesting question, I can't think of a way to do that in the text command.

As you said, probably inserting a newline and hyphen is one of the best solutions.

You can get the width of each character too if you want to add up the length of the string and you can then work out where to put the newline so that it fits best into your text box. We have some examples of getting the font width values which we can send or post.
Are you using unicode custom fonts for your text?

Best Regards, BRT Community


 
Logged

Maxzillian

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Word wrapping?
« Reply #2 on: January 16, 2024, 03:23:52 PM »

Using a hyphen and newline is working. The only unfortunate part is I had to reduce the font size on another page so they could share the same strings and come out looking ok.

Long term I think the way to go is to write some code as you suggested that performs this check automatically. We have talked about trying to determine the width of characters before to do things like this, but haven't had a pressing need to cross that bridge yet. If you have some examples I am certainly interested to see them.

We are using the Roboto font from Google: https://fonts.google.com/specimen/Roboto
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 746
    • View Profile
Re: Word wrapping?
« Reply #3 on: January 16, 2024, 09:04:19 PM »

Hi,
Glad to hear that the newline and hyphen work, no problem we will post some examples to help with the character widths calculation,
Best Regards, BRT Community
Logged