This is a migrated thread and some comments may be shown as answers.

Microsoft OpenType Fonts Are Not Supported!

11 Answers 275 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Sopheap Ly
Top achievements
Rank 1
Sopheap Ly asked on 19 Mar 2008, 06:12 AM
I've just found out that many telerik WinForms controls (Ribbon, Menu, etc) do not support OpenType fonts which are essential for the text of many Unicode languages to render properly. Indian, Arabic and many other Asian languages depend entirely on OpenType to render. In fact, most fonts found in Windows today are in OpenType format.

Note that OpenType is natively supported in Win 2000, XP and Vista, in all .NET controls, many third-party controls, and WPF as well. I find it odd that telerik WinForms doesn't support it.

Resources to read if you don't know OpenType:
http://msdn2.microsoft.com/en-us/library/ms745109.aspx
http://www.microsoft.com/typography/otspec/TTOCHAP1.htm
http://en.wikipedia.org/wiki/OpenType

11 Answers, 1 is accepted

Sort by
0
Angel
Telerik team
answered on 19 Mar 2008, 01:24 PM
Hi Sopheap Ly,

Thank you for writing us.

We use GDI+ and the class Font, which is the default way to draw text in WinForms. The Microsoft Button also uses Font and GDI+ for drawing, so the errors that are shown for our controls are shown for Microsoft's as well - see the attached video for example.

However, we will consider adding extended support for different types of Fonts.

Your Telerik points have been updated for the suggestion.

All the best,
Angel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sopheap Ly
Top achievements
Rank 1
answered on 19 Mar 2008, 02:39 PM
That's not true at all that Microsoft button doesn't support OpenType. I created a sample project that compare RadButton with .NET Button and RadCheckBox with .NET CheckBox. RadButton and RadCheckBox clearly don't render OpenType font while .NET controls do.

Download and unzip CompareOpenType.zip. Install the KhmerOS.ttf into Windows Fonts folder. Then you can open the project file to investigate. You should see the same as shown in the screenshot (included compare-opentype.png). Note that You'll need a Windows Vista to see this properly, as XP has a bugged version of Uniscribe API. In any case, I've included screenshot in the zip.

I think you might get confused with the newest Adobe OpenType specification. It's different from the currently-supported Microsoft OpenType 1.4.

Regards,


0
Sopheap Ly
Top achievements
Rank 1
answered on 20 Mar 2008, 03:49 AM
I've found the culprit. Telerik controls use GDI+ while .NET controls by default use GDI to draw text. More specifically, Telerik WinForms uses the old Graphics.DrawString() as opposed to the new TextRenderer.DrawText(). That is the reason why.

Do you find any particular reason to use DrawString() over DrawText()? I believe the proper way to display a text since .NET 2.0 is to use the new DrawText(). DrawText() is said to be 10x faster than DrawString(). All .NET controls have switched to DrawText() since .NET 2.0, so why has telerik not?

To quote a MSDN article:

"With the DrawText method in the TextRenderer class, you can access GDI functionality for drawing text on a form or control. GDI text rendering typically offers better performance and more accurate text measuring than GDI+."

Regards,
0
Angel
Telerik team
answered on 21 Mar 2008, 12:25 PM
Hi Sopheap Ly,

I must agree that we never made tests with Asian languages under Vista.
Under Windows XP the buttons seem equal (see Buttons_XP.png) so when we made the tests we decided that the visualization is correct.

We have our reasons to use DrawString() instead of DrawText() - there are problems with the painted text when DrawText() is used. As this issue comes to our attention now, we will consider modifications in the painting code.

Thank you for helping us to improve the painting of non-english languages. Please, excuse us for the inconvenience caused. We have updated your Telerik points for the suggestions. Don't hesitate to contact us if you have other questions.

Regards,
Angel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David Ching
Top achievements
Rank 1
answered on 24 Dec 2008, 10:09 PM
Has any progress been made on this?  I am using the latest 8.1 controls, and am bothered that the GDI+ rendered text in a RadListBox is blurry.

See attached file.  There are two red boxes.  First is the blurry text in RadListBox.  Second is the word "Jobs" in the Outlook bar.  The word "Jobs" is much more clearly rendered, and I would like the to request the option to render the text in the RadListBox (and other Telerik controls that use the inferior GDI+)

Thanks,
David

Edit:  I could not figure out how to attach a file, so please see http://dcsoft.com/private/gdi_plus_listbox.png
0
Nick
Telerik team
answered on 29 Dec 2008, 03:13 PM
Hi David Ching,

Thank you for your inquiry. We will consider moving to DrawText but this depends on coping with the painting issues Angel mentioned. I cannot give you an exact timeframe since fixing this this issue is related to a great technical difficulties and concerns changes at TPF level which will have impact at almost all controls. Nevertheless we will do our best to introduce it sooner.
Thank you for your feedback.

Sincerely yours,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Ching
Top achievements
Rank 1
answered on 29 Dec 2008, 04:28 PM
Thank you for the reply, Nick.  I would recommend fixing this ASAP because the fact that the text looks different in the 2 places, as well as looking blurry in the RadListBox makes our products using Telerik WinForms look unprofessional.  Together with the bug report # 173673 which I reported earlier, I hope Telerik fixes these painting issues in the next release.

Best,
David
0
Nick
Telerik team
answered on 30 Dec 2008, 03:14 PM
Hello David Ching,

Thank you again for the feedback. We will try improving this functionality for Q2 2009.

Please note that you may change the TextRenderingHints of the TextPrimitive to different modes representing compromises between performance and text quality. Use the Visual Style Builder to create a custom theme for your controls. You might want to check first how a modified TextPrimitive looks like by starting our Demo application and launching the control spy, then clicking on some control, locating some of the TextPrimitives in the tree and editing it TextRenderingHints property.

Do not hesitate to write me back if you have more questions or comments.
 
Kind regards,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Ching
Top achievements
Rank 1
answered on 30 Dec 2008, 04:58 PM
Sure Nick, thank you.  I did fiddle with the TextRenderingHints, and in the screen shot, it's already jacked up as high quality as it will go:  ClearTypeFitGrid (or something like that).  The point is:  for small text, even the best GDI+ looks blurry compared to GDI.   I can't for the life of me imagine why anyone would want their business applications (which use small text in forms) rendered in GDI+.

MS has this exact same problem with WPF, and they are silent about their plans to fix it, although they acknowledge that it is a problem.

Thanks again,
David
0
David A.
Top achievements
Rank 1
answered on 15 Jun 2009, 03:34 AM
Hi,

I was curious as to if this issue has been resolved or will be resolved.  I am using the Calibri font and it does not render smoothly for several controls including radiobutton and radgrid.  It does render just fine for RadTextBox however.+

Thank you,
David
0
Peter
Telerik team
answered on 16 Jun 2009, 06:53 AM
Hi David,

We haven't switched to TextRender yet, and RadButtons are rendered by default with GDI+ API.  We plan to do major re-factoring in text rendering and introduce easier way to switch between GDI+ and GDI text renderers on TPF level. We are working on this feature as we speak. Stay tuned!

All the best,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Sopheap Ly
Top achievements
Rank 1
Answers by
Angel
Telerik team
Sopheap Ly
Top achievements
Rank 1
David Ching
Top achievements
Rank 1
Nick
Telerik team
David A.
Top achievements
Rank 1
Peter
Telerik team
Share this question
or