Reply to comment
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?
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?
wmjordan
#
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
Richard Moss
#
Hello,
Many thanks for the link. I stopped using
Graphics.DrawString
myself some time ago (either usingTextRenderer
or usingDrawText
,DrawTextEx
andTextOut
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
Roy
#
Do you have any example code on how to actually use this combo box in a C# Windows Forms project?
Richard Moss
#
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 useSelectedItem
to return the selected name and so on.Regards;
Richard Moss