graphic to paint deprecated

Apparently “Graphics” has been deprecated. The analysis of my project says so.
Can someone explain? It isn’t in the LR at all, so I don’t understand what I’m supposed to replace.
I have in the open for a window

Graphics.TextFont = someFont

where some someFont is a property stored elsewhere.

Graphics has only been deprecated for Canvas.Graphics, Window.Graphics, and like properties. Instead, it’s strongly recommended that you do all your drawing in the Paint event of the control, using the “g As Graphics” parameter.

So in the Paint event of the Window, just add:

g.TextFont = someFont