I noticed a strange alignment of Canvas.DrawText when &CRLF& is inserted in the text string and "CENTER" is used for alignment. The largest segment of text is centered but the one or two shorter segments are left justified in alignment with the left most character of the centered segment. I don't think CRLF is recognized in B4A Canvas.DrawText, so this is an improvement. I also tested using TextView with carriage returns after each line of text. The carriage returns were recognized in the string variable but the same alignment issue remained. The sample images was generated with .AddImageToAlbum not a screen shot.
Canvas.DrawText("This is"&CRLF&"a test of the"&CRLF&"month", 160, 160, Font.CreateNew(40),
Colors.Black, "CENTER")
Canvas.DrawText("This is a test"&CRLF&"of the"&CRLF&"month", 160, 160, Font.CreateNew(40), Colors.Black, "CENTER")
Note: If I use "LEFT" for alignment, all of the text starts in the middle of the rectangle and goes to the right, the left side of the rectangle is empty. It is not an accidental left alignment.
Canvas.DrawText("This is"&CRLF&"a test of the"&CRLF&"month", 160, 160, Font.CreateNew(40),
Colors.Black, "CENTER")
Canvas.DrawText("This is a test"&CRLF&"of the"&CRLF&"month", 160, 160, Font.CreateNew(40), Colors.Black, "CENTER")
Note: If I use "LEFT" for alignment, all of the text starts in the middle of the rectangle and goes to the right, the left side of the rectangle is empty. It is not an accidental left alignment.