Code: Select all
If OpenWindow(0, 0, 0, 322, 50, "Font Comparison", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
StringGadget(0, 8, 10, 120, 21, "StringGadget", #PB_Text_Right)
CanvasGadget(1, 140, 10, 120, 21)
If StartDrawing(CanvasOutput(1))
DrawingFont(#PB_Default)
DrawingMode(#PB_2DDrawing_Outlined)
Box(0,0,OutputWidth(),OutputHeight(),RGB(122,122,122))
DrawingMode(#PB_2DDrawing_Default)
nTop = (OutputHeight() - TextHeight("CanvasGadget")) >> 1
DrawText(6, nTop, "CanvasGadget", RGB(0,0,0), RGB(255,255,255))
StopDrawing()
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Any suggestions on how to make the font of the text in the canvas gadget match that of the string gadget?