Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
417
How to set the Appearance.FontData using a Font object
posted

I have created a font object from an embedded resource. This font will not be located or installed on the user machine.

If you set the control.Font property of the UltraTextEditor, the control will display the correct font until the user clicks into the control and activates the editor. The editor is controlled by the appearance object on the control, but this doesn't allow me to set the font data using the Font object. How can this be done please?

Regards,

 

Tim

Parents Reply
  • 417
    posted in reply to Hristo Goshev

    It would appear that my issue is related to the control being draw using GDI when entering edit mode. This feature is defined in the link here. The control attempts to recreate the font from the base list of installed fonts when drawn using GDI rather than GDI+. As stated in my previous post, I’m creating the control font from a resource and therefore this font will not exist on the local machine. When the control enters edit mode, the control is redrawn using GDI which has to resort to a default system font because the font that I’ve created only exists in memory.

    This is an unfortunate and long standing issue with using the UltraTextEditor control. I understand that this is due to the control being a simple wrapper for the base COM object which predates GDI+, but is not time that you chaps at Infragistic redevelop this control using something that supports GDI+?  

    On a side note, the FontData object which can be found hanging off of the Appearance object is a basic class which simply holds font information for the control. This class doesn’t actually hold a Font object or for that matter a collection of FontFamilies. The display fonts are set via the editors in conjunction with the FontData.CreateFont() method and utilise the control.Font property if one has been set.

    Regards,

    Tim

Children