Android Question Cross platform chat layout example - Unicode Resize issue

Added "VowelsCodePoints" to "BC text engine" and chat layout resizing is not working properly when using unicode (Malayalam). Please see the attached image

chat layout resize:
Public Sub Initialize (Parent As B4XView)
    Parent.LoadLayout("1")
    Engine.Initialize(Parent)
 
 
   For i = 0x0D00 To 0x0D7F  'for malayalam language
        Engine.VowelsCodePoints.Add(i)
    Next
    bc.Initialize(300, 300)
    TextField.NextField = TextField
End Sub

Screenshot_20230119_230213.jpg
 
Solution
A workaround for now:
B4X:
Dim s As String = "ടെസ്റ്റിംഗ് ക്രോസ് പ്ലാറ്റ്ഫോം ചാറ്റ് വിത്ത് യൂണികോഡ് ഫോണ്ട് . ഉപയോഗിച്ചിരിക്കുന്ന ഭാഷ മലയാളം .നന്ദി"
s = s.Replace(" ", "  ")
BBCodeView1.Text = s
Word wrapping doesn't work for some reason. Are there spaces in the text? Can you post the Malayalam text?
ടെസ്റ്റിംഗ് ക്രോസ് പ്ലാറ്റ്ഫോം ചാറ്റ് വിത്ത് യൂണികോഡ് ഫോണ്ട് . ഉപയോഗിച്ചിരിക്കുന്ന ഭാഷ മലയാളം .നന്ദി
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
A workaround for now:
B4X:
Dim s As String = "ടെസ്റ്റിംഗ് ക്രോസ് പ്ലാറ്റ്ഫോം ചാറ്റ് വിത്ത് യൂണികോഡ് ഫോണ്ട് . ഉപയോഗിച്ചിരിക്കുന്ന ഭാഷ മലയാളം .നന്ദി"
s = s.Replace(" ", "  ")
BBCodeView1.Text = s
 
Upvote 0
Solution

AnandGupta

Expert
Licensed User
Longtime User
A workaround for now:
B4X:
Dim s As String = "ടെസ്റ്റിംഗ് ക്രോസ് പ്ലാറ്റ്ഫോം ചാറ്റ് വിത്ത് യൂണികോഡ് ഫോണ്ട് . ഉപയോഗിച്ചിരിക്കുന്ന ഭാഷ മലയാളം .നന്ദി"
s = s.Replace(" ", "  ")
BBCodeView1.Text = s
I didn't tried with Hindi yet, but may come handy in it too. 👍
 
Upvote 0
A workaround for now:
B4X:
Dim s As String = "ടെസ്റ്റിംഗ് ക്രോസ് പ്ലാറ്റ്ഫോം ചാറ്റ് വിത്ത് യൂണികോഡ് ഫോണ്ട് . ഉപയോഗിച്ചിരിക്കുന്ന ഭാഷ മലയാളം .നന്ദി"
s = s.Replace(" ", "  ")
BBCodeView1.Text = s
SOLVED ."Double space" technique works .Thank you
 

Attachments

  • Screenshot_20230122_154736 (1).jpg
    Screenshot_20230122_154736 (1).jpg
    236 KB · Views: 46
Upvote 0
Top