cancel
Showing results for 
Search instead for 
Did you mean: 

Word warp issue with multi-line texts (3 lines)

PWagn.1
Associate II

Hi,

I am using word wrap with Text Area component:

textArea.setWideTextAction(WIDE_TEXT_WORDWRAP);

My texts are usually so long that they need to be wrapped to 3 lines.

I have seen no issue with the first wrap (between line 1 and 2), but the second warp (between lines 2 and 3) does not work correctly. The end word is usually broken in the middle (the library tries to put there as many characters as possible).

It appears as if "character wrap" is enabled between 2nd and 3rd line.

Tested on Touch GFX 4.20, but the behaviour was observed at least since 4.17 version.

Am I missing some settings? Or is it simply a bug?

Thanks,

Petr

5 REPLIES 5
Osman SOYKURT
ST Employee

Hello PWagn.1,

I've tried on my side and I did not reproduce the issue.

0693W00000SwKhdQAF.png0693W00000SwKj4QAF.png 

Is it possible for you to share your project ?

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX
PWagn.1
Associate II

Hi,

sorry for delay, it took me longer to further investigate.

The issue is caused by height of the text area. It seems that if the height is slightly lower than certain value, the library switches to character-wrapping instead of word wrapping on last but one line.

Example in my case:

  • font: Exo2Light (size 18)
  • text area height 68px (3 lines) causes switch to character wrap
  • text area height 70px (3 lines) works as expected
  • Used text; "Error ***: No frequency feedback from fan after 1 minute"
  • custom board with L431 MCU, partial buffering
  • Note: On Nucleo G071RB+GFX01M1 AZ1, I observe similar behaviour, but the heights are different: 64px character wrap, 66px word wrap

For the height of 68 (or 64px) pixels, there is no visible cropping of the text on the bottom of text field.

I do not know, what is the specification, but I would expect that word wrapping should be used in all cases. Especially when the multi-line texts are not supported via GUI and they must be enabled via code. Then the determination of needed height is trial and error.

Thanks,

Petr

PWagn.1
Associate II

0693W00000UnPPxQAN.jpg0693W00000UnPPnQAN.jpg

PWagn.1
Associate II

Demonstration project for G071RB+GFX01M1 AZ1.

Created in TouchGFX 4.18.1 (G071RB+GFX01M1 AZ1 setup from 4.20 has some issues and fails to init LCD driver!?).

Osman SOYKURT
ST Employee

Hello PWagn.1,

We took note of this issue and have colleagues on it. That's very strange indeed.

"I would expect that word wrapping should be used in all cases. Especially when the multi-line texts are not supported via GUI and they must be enabled via code" --> Actually it's possible from TouchGFX Designer to enter multi lines texts :

Go to Texts section in the left panel and find your resource from there. You can then from this interface edit your text and just add a new line to it by pressing the "ENTER" key .

0693W00000UnpRkQAJ.png0693W00000UnpRzQAJ.png0693W00000UnpSYQAZ.pngSo I suggest you to use this workaround until we got a fix for this bug. You can also increase the height of your TextArea as you showed me.

I'll get back to you when I'll have more info about the fix.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX