IgnaceMaes / MaterialSkin

Theming .NET WinForms, C# or VB.Net, to Google's Material Design Principles.
MIT License
2.84k stars 829 forks source link

Font doesn't change #149

Closed chpecson closed 8 months ago

chpecson commented 7 years ago

Font doesn't change.

For example changing the font size, font family, etc in the properties, it do applies in the design view but when the code runs it ain't apply the changes in the form.

shDiego commented 7 years ago

The font is set in the constructor, you can overwrite the component and remove this feature.

Lutymane commented 7 years ago

If you want to replace all fonts

materialSkinManager = MaterialSkinManager.Instance; ... materialSkinManager.ROBOTO_MEDIUM_10 = new Font("font name", 10); materialSkinManager.ROBOTO_MEDIUM_11 = new Font("font name", 11); materialSkinManager.ROBOTO_MEDIUM_12 = new Font("font name", 12); materialSkinManager.ROBOTO_REGULAR_11 = new Font("font name", 11);

VahidEra commented 7 years ago

If i want to change only one control font how can i do that?

I can't change any thing in material skin open Source because When I open it in Visual Studio is full of errors

screenshot 2

ghost commented 6 years ago

@VahidEra I am looking for same thing, How you managed to get it done ?

leonelunderscore commented 5 years ago

I encountered the same problem

shannonfonseka commented 3 years ago

Well I found a solution from the internet in VB language:

Dim pfc As New PrivateFontCollection
pfc.AddFontFile(Application.StartupPath & "\fnts\Roboto-Light.ttf") 'Your font location, make sure the font is in "*.ttf" format
MaterialLabel1.Font = New Font(pfc.Families(0), 16) 
AngelPM98 commented 4 months ago

ROBOTO_MEDIUM11 el ROBOTO ... De donde lo sacas?

avarantes commented 3 months ago

How can this be disabled?