MaterialSkin icon indicating copy to clipboard operation
MaterialSkin copied to clipboard

Font doesn't change

Open chpecson opened this issue 7 years ago • 6 comments

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.

chpecson avatar Jan 03 '17 02:01 chpecson

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

shDiego avatar Jan 03 '17 15:01 shDiego

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);

Lutymane avatar Apr 26 '17 19:04 Lutymane

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

VahidEra avatar May 09 '17 12:05 VahidEra

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

ghost avatar Mar 30 '18 07:03 ghost

I encountered the same problem

leonelunderscore avatar Sep 25 '18 20:09 leonelunderscore

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) 
  • Import System.Drawing.Text
  • Use this code under Form1_Load (or for another form) subroutine.

shannonfonseka avatar Feb 27 '21 04:02 shannonfonseka

ROBOTO_MEDIUM_11 el ROBOTO_ ... De donde lo sacas?

AngelPM98 avatar Mar 12 '24 16:03 AngelPM98

How can this be disabled?

avarantes avatar Apr 11 '24 23:04 avarantes