Font
Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System.Drawing
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
[Editor("System.Drawing.Design.FontEditor, System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[TypeConverter(typeof(FontConverter))]
public sealed class Font : MarshalByRefObject, ICloneable, IDisposable, ISerializable
{
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool Bold {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[Browsable(false)]
public FontFamily FontFamily {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public byte GdiCharSet {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool GdiVerticalFont {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[Browsable(false)]
public int Height {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[Browsable(false)]
public bool IsSystemFont {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool Italic {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Editor("System.Drawing.Design.FontNameEditor, System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[TypeConverter(typeof(FontConverter.FontNameConverter))]
public string Name {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[System.Runtime.CompilerServices.Nullable(2)]
[Browsable(false)]
public string OriginalFontName {
[System.Runtime.CompilerServices.NullableContext(2)]
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
public float Size {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[Browsable(false)]
public float SizeInPoints {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool Strikeout {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[Browsable(false)]
public FontStyle Style {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[Browsable(false)]
public string SystemFontName {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool Underline {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
[TypeConverter(typeof(FontConverter.FontUnitConverter))]
public GraphicsUnit Unit {
get {
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
public Font(Font prototype, FontStyle newStyle)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(FontFamily family, float emSize)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(FontFamily family, float emSize, FontStyle style)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet, bool gdiVerticalFont)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(FontFamily family, float emSize, GraphicsUnit unit)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(string familyName, float emSize)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(string familyName, float emSize, FontStyle style)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet, bool gdiVerticalFont)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public Font(string familyName, float emSize, GraphicsUnit unit)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public object Clone()
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public void Dispose()
{
}
[System.Runtime.CompilerServices.NullableContext(2)]
public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object obj)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
~Font()
{
}
public static Font FromHdc(IntPtr hdc)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public static Font FromHfont(IntPtr hfont)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public static Font FromLogFont(object lf)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public static Font FromLogFont(object lf, IntPtr hdc)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public override int GetHashCode()
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public float GetHeight()
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public float GetHeight(Graphics graphics)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public float GetHeight(float dpi)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
void ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public IntPtr ToHfont()
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public void ToLogFont(object logFont)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public void ToLogFont(object logFont, Graphics graphics)
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
public override string ToString()
{
throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported);
}
}
}