DLC
14 years agoVisitor
Create Font
Hello everybody, In the SDK, there is this example : fontReg.Register("pkg:/fonts/LCDMono.ttf") font = fontReg.Get("LCDMono",36,50,false) ' 36pt, 50 is normal weight, no italics I suppose...
"DLC" wrote:my_font = CreateObject("roFontRegistry")
my_font.Register("pkg:/fonts/calibri.ttf")
my_font.Get("calibri", 14, 50, false)
bitmap.DrawRect(x, y, 300, 50, &h00000000)
bitmap.DrawText(Final_Array[i][j], x, y, &hFFFFFFFF, my_font)
screen.DrawObject(0, 0, bitmap)
screen.Finish()
Thank you.
frg = CreateObject("roFontRegistry")
frg.Register("pkg:/fonts/myfont.ttf")
fonts = frg.GetFamilies()
font = frg.GetFont(fonts[0], 32, false, false)
bmp.DrawText("My Text", 0, 0, &h000000FF, font)