Public Sub TextToBitmap (s As String, IsMaterialIcons As Boolean, FontSize As Float, color As Int) As Bitmap
Dim bmp As Bitmap
bmp.InitializeMutable(32dip, 32dip)
Dim cvs As Canvas
cvs.Initialize2(bmp)
Dim h As Double
Dim t As Typeface
If IsMaterialIcons Then t = Typeface.MATERIALICONS Else t = Typeface.FONTAWESOME
h = cvs.MeasureStringHeight(s, t, FontSize)
cvs.DrawText(s, bmp.Width / 2, bmp.Height / 2 + h / 2, t, FontSize, color, "CENTER")
Return bmp
End Sub