leocb / MaterialSkin

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

Some MaterialComponents Text have "+-1" Issue #337

Closed byungmeo closed 2 years ago

byungmeo commented 2 years ago

image

2022-02-12 12-46-08

HelloWorld! -> IfmmpXpsme" -> GdkknVnqkc

I don't know why actually occur this issue. and i haven't found a way to reproduce it in another way.

The same issue occurs with other components. However, it is only that Issue has not occurred yet.

One thing is certain, this problem arises only for English and numbers.

++ I'm suspicious this is the default font problem of VisualStudio, and I wonder how default fonts are in the British and American regions.

I don't know if it's related. if Form Font changed to "Roboto" Labels (Defalut component) Text to change -1 (only inside form editor)

2022-02-12 12-58-30

orapps44 commented 2 years ago

Hi,

I'm not realy sure what issue is due to poor video quality. If you try to change font and/or font size, this feature isn't supported at the moment (see #336 & #207).

byungmeo commented 2 years ago

@orapps44 image

It's the same as this screenshot. (ex : Home -> Gnld) I didn't change the font in this sample, and so did other settings. That's why I thought the default font set in VisualStudio might be the problem.

orapps44 commented 2 years ago

Do you mean you got this when running current master without changing anything ?

byungmeo commented 2 years ago

@orapps44 yes. I downloaded it again and tried it, but it's the same.

don't know if it'll help, this is my VisualStudio(2022) config file vsconfig.zip.zip Exported-2022-02-12.zip

and sample project file MaterialSkin-master_2.zip

orapps44 commented 2 years ago

Using your zip file and VS2019 or VS2022 everything ok on my side.

image

byungmeo commented 2 years ago

@orapps44 I want to know the default font that works well. (not Roboto) My VisualStudio Winform default font is "맑은 고딕". This is basically set up when VisualStudio Winform is installed in Korea. I think this is a problem.

I am willing to change my default font to that font. If you let me know, I'll try after changing the default font.

image

valimaties commented 2 years ago

Hi @byungmeo I think the problem is that you use an unsupported font by MaterialSkin. One more thing about Font property in all components, I think it must be hidden. DON'T change it, because MaterialSkin uses Roboto font family and this is render as it has to be in components. This is how is made MaterialSkin, for now. If this project does not helps you, this means you can not use MaterialSkin. Or you must make your own changes to MaterialSkin to be able to use NotoSans font family in your applications. I tried to make some changes to this project, but there are some problems by reading NotoSans font family, to add to MaterialSkin library font family, but right now it is not possible.

byungmeo commented 2 years ago

@valimaties thanks for answer. Of course, I didn't change all the fonts of Material Component and left them as they were.

I think this is a regional problem for Visual Studio, but the symptoms were the same even if fonts in all possible areas were changed to English-based.

I'll try installing VisualStudio in English version. If there is a positive result, I will mention it.

thank you!

valimaties commented 2 years ago

I've tried for some days to find a possibility to add NotoSansKR font family, but I have some issue by reading font family: addFont method adds fonts from resources to privateFontCollection collection. GDI+ method add it correctly only Roboto fonts family, but NotoSans is not read:

TryingToAddFontFamily

... so. we must dig in it...

byungmeo commented 2 years ago

@valimaties I'm sorry for not being able to help you directly.

I'm using this plug-in too well, so I'm going to endure and use this part to some extent. and I will try many things to help contributors indirectly.

byungmeo commented 2 years ago

@valimaties @orapps44 image

I found a solution!

The problem was that the Roboto font was installed.

I don't know what this is related to, but after erasing the Roboto font, the font is output normally.

I'll close this issue! Thank you for your interest.

JimCHH commented 2 years ago

@byungmeo Hi, thank you for your findings. I know its a closed issue. However, I also have the same problem here. The Text Rendering in some component will -1 (e.g. materialLabel, materialListBox). "BCDEF" -> "ABCDE"

I have Roboto font installed on my Desktop, while running build 2.3.1, using VS2019 with zh-tw language setting. I haven't tried to uninstall because it seems that other font is not supported for now. #207

I'll keep looking for solution to this.