Hi there,
I want to get the image of a single character like "我" and "?".
I tried using B4XCanvas's MeasureText and Canvas's drawText:
But I find its edges are cut a bit.
Font size: 16
Font siz: 30
I want to get the image of a single character like "我" and "?".
I tried using B4XCanvas's MeasureText and Canvas's drawText:
B4X:
Dim emptyPane As Pane
emptyPane.Initialize("")
Dim cvs1 As B4XCanvas
cvs1.Initialize(emptyPane)
Dim r As B4XRect=cvs1.MeasureText(s,f)
Dim width,height As Double
width=r.Width
height=r.Height
Dim X,Y As Double
X=0
Y=height
Dim Canvas1 As Canvas
Canvas1.Initialize("")
Canvas1.SetSize(width,height)
Canvas1.DrawText(s,X,Y,fx.DefaultFont(30),fx.Colors.Black,"LEFT")
Return Canvas1.Snapshot2(fx.Colors.Transparent)
But I find its edges are cut a bit.
Font size: 16
Font siz: 30