Here are the examples of the csharp api class System.Drawing.Font.FromHfont(System.IntPtr) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Example
0
1. Example
Project: VsTeXCommentsExtension
Source File: VsSettings.cs
Source File: VsSettings.cs
private static Font LoadTextEditorFont(IVsFontsAndColorsInformationService vsFontsAndColorsInformationService) { try { //OMG! Isn't there any better way? var guidDefaultFileType = new Guid(2184822468u, 61063, 4560, 140, 152, 0, 192, 79, 194, 171, 34); //from Microsoft.VisualStudio.Editor.Implementation.ImplGuidList var info = vsFontsAndColorsInformationService.GetFontAndColorInformation(new FontsAndColorsCategory( guidDefaultFileType, DefGuidList.guidTextEditorFontCategory, DefGuidList.guidTextEditorFontCategory)); //info.Updated - event does not work. Don't know why :( var preferences = info.GetFontAndColorPreferences(); return Font.FromHfont(preferences.hRegularViewFont); } catch { return SystemFonts.DefaultFont; } }