IgnaceMaes / MaterialSkin

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

How to change font size? #240

Open MaTongGe opened 5 years ago

MaTongGe commented 5 years ago

I can change the font size in the properties panel, but the font size cannot change when running.

image The form in VisualStudio

image The running form

slow-down commented 4 years ago

What exactly do you mean? Your images are confusing..

Fish-Cyf commented 4 years ago

可算遇到中国人了兄弟,,这个控件巨难用,字体改不了颜色改不了,在这里看问答好折磨啊,问怎么改色改字体也没人说

MaTongGe commented 4 years ago

你去看源代码里面的Font都是写死的,改一下就可以了,我全部重写了一遍但是改的贼乱,基本上去掉了所有的风格统一的功能,你要的话可自取

马桶哥

北京师范大学附属中学 初三14班 choushuimatong123@126.com |

签名由 网易邮箱大师 定制

On 07/03/2020 22:44, Fish-Cyf wrote:

可算遇到中国人了兄弟,,这个控件巨难用,字体改不了颜色改不了,在这里看问答好折磨啊,问怎么改色改字体也没人说

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

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) 
bimeng commented 2 years ago

你去看源代码里面的Font都是写死的,改一下就可以了,我全部重写了一遍但是改的贼乱,基本上去掉了所有的风格统一的功能,你要的话可自取 | | 马桶哥 | | 北京师范大学附属中学 初三14班 choushuimatong123@126.com | 签名由 网易邮箱大师 定制 On 07/03/2020 22:44, Fish-Cyf wrote: 可算遇到中国人了兄弟,,这个控件巨难用,字体改不了颜色改不了,在这里看问答好折磨啊,问怎么改色改字体也没人说 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

materialSkinManager = MaterialSkinManager.Instance; ... materialSkinManager.ROBOTO_MEDIUM_10 = 新字体("字体名称",10); materialSkinManager.ROBOTO_MEDIUM_11 = 新字体("字体名称",11); materialSkinManager.ROBOTO_MEDIUM_12 = 新字体("字体名称",12); materialSkinManager.ROBOTO_REGULAR_11 = 新字体("字体名称",11)