Windows forms fonts


















NET 6 and later versions, the System. Common package , which includes this type, is only supported on Windows operating systems. Use of this type in cross-platform apps causes compile-time warnings and run-time exceptions. For more information, see System. Common only supported on Windows. Initializes a new Font that uses the specified existing Font and FontStyle enumeration. Initializes a new Font using a specified size. Initializes a new Font using a specified size and style.

Initializes a new Font using a specified size, style, and unit. Initializes a new Font using a specified size, style, unit, and character set. Initializes a new Font using a specified size and unit. Sets the style to Regular.

Initializes a new Font using the specified size, style, unit, and character set. The style is set to Regular. Gets a value that indicates whether this Font is bold. Gets the FontFamily associated with this Font.

Gets a byte value that specifies the GDI character set that this Font uses. Gets a value indicating whether the font is a member of SystemFonts. Gets the face name of this Font. Gets the em-size of this Font measured in the units specified by the Unit property. Gets the em-size, in points, of this Font. Gets a value that indicates whether this Font specifies a horizontal line through the font. Gets style information for this Font. Gets the name of the system font if the IsSystemFont property returns true.

Gets a value that indicates whether this Font is underlined. Gets the unit of measure for this Font. Creates an exact copy of this Font. AddMemoryFont System. IntPtr pFontData,fontdata. Font fn; foreach FontFamily ff in pfc. IsStyleAvailable FontStyle. Regular ; e. DrawString fn. GenericTypographic ; fn. Bold ; e. Italic ; e. Bold FontStyle. Underline ; e. Strikeout ; e. Hope this helps. Andrew Morton Ash Ash Thomas Thomas k 43 43 gold badges silver badges bronze badges.

Is there an example some where? I can really understand the MSDN link. Thank you for you help. Alexander Prokofyev Alexander Prokofyev Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. The Font to apply to the text displayed by the control. The default is the value of the DefaultFont property.

The Font property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control.

For example, a Button will have the same BackColor as its parent Form by default. For more information about ambient properties, see the AmbientProperties class or the Control class overview. Because the Font is immutable meaning that you cannot adjust any of its properties , you can only assign the Font property a new Font.

However, you can base the new font on the existing font. When overriding the Font property in a derived class, use the base class's Font property to extend the base implementation.



0コメント

  • 1000 / 1000