I want to show a CSBuilder text in the label where that text has 2 FontAwesome characters in it.
These 2 FontAwesome characters show up a bit too high, so I am trying to correct that with VerticalAlign spans.
With trial and error I have it kind of working with this code:
There still is a problem as the line holding the 2 FontAwesome characters shows slightly too low and sofar I have been unable to fix this.
I noticed that this is a simpler using the BCTextEngine:
This makes it show all fine, but I currently not using BCTextEngine in my app and using that instead would involve lots of code changes.
I guess I must be doing something wrong in my CSBuilder code.
RBS
These 2 FontAwesome characters show up a bit too high, so I am trying to correct that with VerticalAlign spans.
With trial and error I have it kind of working with this code:
B4X:
cs.Initialize.Typeface(Typeface.DEFAULT).Size(18).Append("This allows you to run quickly through" & CRLF & _
"a list of patients by clicking the" & CRLF).Pop
cs.Typeface(Typeface.FONTAWESOME).Size(28).VerticalAlign(-12dip).Append(Chr(0xF0D8)).Pop
cs.Typeface(Typeface.DEFAULT).Size(18).VerticalAlign(-16dip).Append(" and ").Pop
cs.Typeface(Typeface.FONTAWESOME).Size(28).VerticalAlign(-12dip).Append(Chr(0xF0D7)).Pop
cs.Typeface(Typeface.DEFAULT).Size(18).VerticalAlign(-16dip).Append(" buttons on various pages.").Pop
cs.Typeface(Typeface.DEFAULT).Size(18).Append(CRLF & CRLF & "Start, will start this option." & CRLF & _
"Stop will stop it.").PopAll
There still is a problem as the line holding the 2 FontAwesome characters shows slightly too low and sofar I have been unable to fix this.
I noticed that this is a simpler using the BCTextEngine:
B4X:
BBCodeView1.Text = _
$"[TextSize=18]This allows you to run quickly through a
list of patients by clicking the [TextSize=28][Vertical=3][FontAwesome=0xF0D8/][/Vertical][TextSize=18] and [TextSize=28][Vertical=3][FontAwesome=0xF0D7/][/Vertical][TextSize=18]
buttons on various pages.
Start will start this option.
Stop will stop it.
"$
This makes it show all fine, but I currently not using BCTextEngine in my app and using that instead would involve lots of code changes.
I guess I must be doing something wrong in my CSBuilder code.
RBS