Character vertical alignment problem when using Korean fonts

1 Answer 45 Views
Buttons, RadioButton, CheckBox, etc
pookyung
Top achievements
Rank 1
pookyung asked on 30 Jul 2022, 08:27 AM

When I change to Korean font when using Telerik WinForm control, vertical alignment does not work properly.

In the attached picture, the left side is the basic controls of the window form, and the right side is the Telerik control.

In the Telerik control, vertical alignment is not correct when using Korean fonts.

That is, the text is raised a little higher.

Segoe UI, which is automatically selected when adding Telerik controls, is well aligned.

Can I manually adjust this?

 

Thank you.

BooKyung Oh.

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 01 Aug 2022, 11:10 AM

Hi pookyung,

Thank you for the provided image.

To avoid any misunderstanding, may I ask you to share some code snippets of how you have set up the controls? More specifically are you using a custom font? From the image, I can see that the default Telerik Winforms Theme is used. On my side, I could not observe any difference in the vertical alignment of the text inside the controls. 


It will be great if you can send me a sample project with your code so that I can perform more tests on my side. I am looking forward to your reply.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

pookyung
Top achievements
Rank 1
commented on 02 Aug 2022, 01:14 AM

The Korean font is Gulim, 9 pt.
This font and size is the most used in Korea.
This is the default font and size used when creating a Form in Visual Studio in Korean.
Dinko | Tech Support Engineer
Telerik team
commented on 03 Aug 2022, 11:00 AM

Thank you for the provided files and additional details. Upon checking it on my side this comes from the setting of the custom font itself. The rendering engine is drawing the text a few pixels above. This comes from the settings applied to the custom font. By default, Telerik Presentation Framework uses GDI+ to measure and render the text. You can easily switch to GDI instead by setting the UseCompatibleTextRendering property to false for the respective control. Note that HTML-like text formatting functionality is supported only when using GDI+. You can find more information in the Text Rendering help article. In your case, you can try setting the UseCompatibleTextRendering property per control or use the global static property.

public RadForm1()
{
    RadControl.UseCompatibleTextRenderingDefaultValue = false;
    InitializeComponent();
}

After setting this property to false, the text is more centered than before but still not perfect as your requirement. Still, you can try it and consider using this approach.

Tags
Buttons, RadioButton, CheckBox, etc
Asked by
pookyung
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or