I manage to embed my own fonts in a WinForms app. However the solution provided there requires me to:
manually apply to individual control, e.g.
private void Form1_Load(object sender, EventArgs e) { userControl1.Font = myFont; button1.Font = myFont; }
all of them will have the same size
Is there a way to do this better? Something similar to CSS. I try Form1.Font = myFont;
but it throws me Error CS0120:
An object reference is required for the non-static field, method, or property 'Control.Font'
I put it in the constructor of Form1
as well, and it builds successfully, but it doesn't change anything on the display.
Is there a way to fix this?