private void CreateFont() { this.hFont = IntUnsafeNativeMethods.CreateFontIndirect(this.logFont); if (this.hFont == IntPtr.Zero) { this.logFont.lfFaceName = "Microsoft Sans Serif"; this.logFont.lfOutPrecision = 7; this.hFont = IntUnsafeNativeMethods.CreateFontIndirect(this.logFont); } IntUnsafeNativeMethods.GetObject(new HandleRef(this, this.hFont), this.logFont); this.ownHandle = true; }