While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?

Styling with Markdown is supported

Original Comment

wmjordan

# Reply

I noticed that you've used GDI++ to draw the text. It is widely known that GDI++ does not support OpenType fonts or Rastered fonts and consequently those fonts would not show up in the box. Previously I wrote an article about P/Invoking Windows GDI to render those 'unsupported' fonts, in which you may also feel interested. http://www.codeproject.com/Tips/557423/Rendering-Text-with-OpenType-Fonts-Using-GDI

Gravatar

Richard Moss

# Reply

Hello,

Many thanks for the link. I stopped using Graphics.DrawString myself some time ago (either using TextRenderer or using DrawText, DrawTextEx and TextOut directly). I wasn't aware that GDI+ didn't support some fonts properly, I stopped using it because it looks bloody awful and has no consistency with the rest of the OS :)

Regards; Richard Moss

Gravatar

Roy

# Reply

Do you have any example code on how to actually use this combo box in a C# Windows Forms project?

Gravatar

Richard Moss

# Reply

No, I didn't do a sample for this project. Think of it as a list of font names, just drawn prettier. It doesn't handle creation of fonts for you, it's purpose was to allow the selection of a font name in conjunction with other controls for selecting styles, size etc. The Items collection holds all those names, so you can use SelectedItem to return the selected name and so on.

Regards;
Richard Moss