-->Inheritance Attributes
![System System](https://www.researchgate.net/profile/S_Mostafa_Rasoolimanesh/publication/262852102/figure/fig1/AS:296514548191250@1447705985656/The-Urban-Management-System-in-Iran-Source-22.png)
![System System](/uploads/1/2/6/3/126307896/318183293.jpg)
Learn more about the Iran economy, including the population of Iran, GDP, facts. The judicial system is not independent; the supreme leader directly appoints. TEHRAN, Iran (AP) - The blowback over the U.S. Killing of a top Iranian general is mounting. Iran says it is abandoning the limits in the 2015 nuclear deal.
Definition
Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
Font
TypeConverterAttributeComVisibleAttributeSerializableAttributeTypeConverterAttribute
- Implements
Examples
The following code example demonstrates how to use the Font constructor and the Size, SizeInPoints, and Unit properties. This example is designed to be used with a Windows Form that contains a ComboBox named
ComboBox1
that is populated with the strings 'Bigger' and 'Smaller' and a Label named Label1
. Paste the following code into the form and associate the ComboBox1_SelectedIndexChanged
method with the SelectedIndexChanged event of the ComboBox control.Remarks
For more information about how to construct fonts, see How to: Construct Font Families and Fonts. Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If you attempt to use a font that is not supported, or the font is not installed on the machine that is running the application, the Microsoft Sans Serif font will be substituted.
Constructors
Font(Font, FontStyle) | Initializes a new Font that uses the specified existing Font and FontStyle enumeration. |
Font(FontFamily, Single) | Initializes a new Font using a specified size. |
Font(FontFamily, Single, FontStyle) | Initializes a new Font using a specified size and style. |
Font(FontFamily, Single, FontStyle, GraphicsUnit) | Initializes a new Font using a specified size, style, and unit. |
Font(FontFamily, Single, FontStyle, GraphicsUnit, Byte) | Initializes a new Font using a specified size, style, unit, and character set. |
Font(FontFamily, Single, FontStyle, GraphicsUnit, Byte, Boolean) | Initializes a new Font using a specified size, style, unit, and character set. |
Font(FontFamily, Single, GraphicsUnit) | Initializes a new Font using a specified size and unit. Sets the style to Regular. |
Font(String, Single) | Initializes a new Font using a specified size. |
Font(String, Single, FontStyle) | Initializes a new Font using a specified size and style. |
Font(String, Single, FontStyle, GraphicsUnit) | Initializes a new Font using a specified size, style, and unit. |
Font(String, Single, FontStyle, GraphicsUnit, Byte) | Initializes a new Font using a specified size, style, unit, and character set. |
Font(String, Single, FontStyle, GraphicsUnit, Byte, Boolean) | Initializes a new Font using the specified size, style, unit, and character set. |
Font(String, Single, GraphicsUnit) | Initializes a new Font using a specified size and unit. The style is set to Regular. |
Properties
Bold | Gets a value that indicates whether this Font is bold. |
FontFamily | Gets the FontFamily associated with this Font. |
GdiCharSet | Gets a byte value that specifies the GDI character set that this Font uses. |
GdiVerticalFont | Gets a Boolean value that indicates whether this Font is derived from a GDI vertical font. |
Height | Gets the line spacing of this font. |
IsSystemFont | Gets a value indicating whether the font is a member of SystemFonts. |
Italic | Gets a value that indicates whether this font has the italic style applied. |
Name | Gets the face name of this Font. |
OriginalFontName | Gets the name of the font originally specified. |
Size | Gets the em-size of this Font measured in the units specified by the Unit property. |
SizeInPoints | Gets the em-size, in points, of this Font. |
Strikeout | Gets a value that indicates whether this Font specifies a horizontal line through the font. |
Style | Gets style information for this Font. |
SystemFontName | Gets the name of the system font if the IsSystemFont property returns true . |
Underline | Gets a value that indicates whether this Font is underlined. |
Unit | Gets the unit of measure for this Font. |
Methods
Clone() | Creates an exact copy of this Font. |
CreateObjRef(Type) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject) |
Dispose() | Releases all resources used by this Font. |
Equals(Object) | Indicates whether the specified object is a Font and has the same FontFamily, GdiVerticalFont, GdiCharSet, Style, Size, and Unit property values as this Font. |
Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. |
FromHdc(IntPtr) | Creates a Font from the specified Windows handle to a device context. |
FromHfont(IntPtr) | Creates a Font from the specified Windows handle. |
FromLogFont(Object) | Creates a Font from the specified GDI logical font ( LOGFONT ) structure. |
FromLogFont(Object, IntPtr) | Creates a Font from the specified GDI logical font ( LOGFONT ) structure. |
GetHashCode() | Gets the hash code for this Font. |
GetHeight() | Returns the line spacing, in pixels, of this font. |
GetHeight(Graphics) | Returns the line spacing, in the current unit of a specified Graphics, of this font. |
GetHeight(Single) | Returns the height, in pixels, of this Font when drawn to a device with the specified vertical resolution. |
GetLifetimeService() | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
InitializeLifetimeService() | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject) |
MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object) |
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject) |
ToHfont() | Returns a handle to this Font. |
ToLogFont(Object) | Creates a GDI logical font ( LOGFONT ) structure from this Font. |
ToLogFont(Object, Graphics) | Creates a GDI logical font ( LOGFONT ) structure from this Font. |
ToString() | Returns a human-readable string representation of this Font. |
![System System](https://www.researchgate.net/profile/S_Mostafa_Rasoolimanesh/publication/262852102/figure/fig1/AS:296514548191250@1447705985656/The-Urban-Management-System-in-Iran-Source-22.png)
![System System](/uploads/1/2/6/3/126307896/318183293.jpg)
Explicit Interface Implementations
ISerializable.GetObjectData(SerializationInfo, StreamingContext) | Populates a SerializationInfo with the data needed to serialize the target object. |