Font イベント
Font クラス
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)

Public NotInheritable Class Font Implements IDisposable
public sealed class Font : IDisposable
public final class Font implements IDisposable
public final class Font implements IDisposable

Microsoft.WindowsMobile.DirectX.Direct3D.BaseMesh
Microsoft.WindowsMobile.DirectX.Direct3D.Font


Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font クラス
アセンブリ: System.Drawing (system.drawing.dll 内)

<SerializableAttribute> _ <ComVisibleAttribute(True)> _ Public NotInheritable Class Font Inherits MarshalByRefObject Implements ICloneable, ISerializable, IDisposable
[SerializableAttribute] [ComVisibleAttribute(true)] public sealed class Font : MarshalByRefObject, ICloneable, ISerializable, IDisposable
[SerializableAttribute] [ComVisibleAttribute(true)] public ref class Font sealed : public MarshalByRefObject, ICloneable, ISerializable, IDisposable

Windows フォーム アプリケーションでは、TrueType フォントをサポートしています。また、OpenType フォントも制限付きでサポートしています。サポートされていないフォントを使用しようとした場合や、アプリケーションを実行するコンピュータにフォントがインストールされていない場合は、代わりに Microsoft Sans Serif が使用されます。

System.MarshalByRefObject
System.Drawing.Font


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (String, Single)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim familyName As String Dim emSize As Single Dim instance As New Font(familyName, emSize)
public Font ( string familyName, float emSize )
public: Font ( String^ familyName, float emSize )
public Font ( String familyName, float emSize )


結果として得られたフォントの Style プロパティは FontStyle.Regular に設定され、Unit プロパティは GraphicsUnit.Point に設定されます。Windows フォーム アプリケーションでは、TrueType フォントをサポートしています。また、OpenType フォントも制限付きでサポートしています。familyName パラメータが、アプリケーションを実行するコンピュータにインストールされていないフォントやサポートされていないフォントを指定した場合は、代わりに Microsoft Sans Serif が使用されます。

Font コンストラクタと Size、SizeInPoints、および Unit の各プロパティを使用する方法を次のコード例に示します。この例は、ComboBox1 という名前の ComboBox に "Bigger" と "Smaller" という文字列が設定された Windows フォームでの使用を意図してデザインされています。そして、次のコードをそのフォームに貼り付け、ComboBox1_SelectedIndexChanged メソッドに、ComboBox コントロールの SelectedIndexChanged イベントを関連付けます。
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged ' Cast the sender object back to a ComboBox. Dim ComboBox1 As ComboBox = CType(sender, ComboBox) ' Retrieve the selected item. Dim selectedString As String = CType(ComboBox1.SelectedItem, String) ' Convert it to lowercase. selectedString = selectedString.ToLower() ' Declare the current size. Dim currentSize As Single ' Switch on the selected item. Select Case selectedString ' If Bigger is selected, get the current size from the ' Size property and increase it. Reset the font to the ' new size, using the current unit. Case "bigger" currentSize = Label1.Font.Size currentSize += 2.0F Label1.Font = New Font(Label1.Font.Name, currentSize, _ Label1.Font.Style, Label1.Font.Unit) ' If Smaller is selected, get the current size, in points , ' and decrease it by 1. Reset the font with the new size ' in points. Case "smaller" currentSize = Label1.Font.SizeInPoints currentSize -= 1 Label1.Font = New Font(Label1.Font.Name, currentSize, _ Label1.Font.Style) End Select End Sub
private void ComboBox1_SelectedIndexChanged(System.Object sender, System.EventArgs e) { // Cast the sender object back to a ComboBox. ComboBox ComboBox1 = (ComboBox) sender; // Retrieve the selected item. string selectedString = (string) ComboBox1.SelectedItem; // Convert it to lowercase. selectedString = selectedString.ToLower(); // Declare the current size. float currentSize; // Switch on the selected item. switch(selectedString) { // If Bigger is selected, get the current size from the // Size property and increase it. Reset the font to the // new size, using the current unit. case "bigger": currentSize = Label1.Font.Size; currentSize += 2.0F; Label1.Font = new Font(Label1.Font.Name, currentSize, Label1.Font.Style, Label1.Font.Unit); // If Smaller is selected, get the current size, in points , // and decrease it by 1. Reset the font with the new size // in points. break; case "smaller": currentSize = Label1.Font.SizeInPoints; currentSize -= 1; Label1.Font = new Font(Label1.Font.Name, currentSize, Label1.Font.Style); break; } }
private: void ComboBox1_SelectedIndexChanged(System::Object^ sender , System::EventArgs^ e) { // Cast the sender object back to a ComboBox. ComboBox^ ComboBox1 = (ComboBox^) sender; // Retrieve the selected item. String^ selectedString = (String^) ComboBox1->SelectedItem; // Convert it to lowercase. selectedString = selectedString->ToLower(); // Declare the current size. float currentSize; // If Bigger is selected, get the current size from the // Size property and increase it. Reset the font to the // new size, using the current unit. if (selectedString == "bigger") { currentSize = Label1->Font->Size; currentSize += 2.0F; Label1->Font =gcnew System::Drawing::Font(Label1->Font->Name, currentSize, Label1->Font->Style, Label1->Font->Unit); } // If Smaller is selected, get the current size, in // points, and decrease it by 2. Reset the font with // the new size in points. if (selectedString == "smaller") { currentSize = Label1->Font->Size; currentSize -= 2.0F; Label1->Font = gcnew System::Drawing::Font(Label1->Font->Name, currentSize, Label1->Font->Style); } }
private void comboBox1_SelectedIndexChanged(Object sender, System.EventArgs e) { // Cast the sender object back to a ComboBox. ComboBox comboBox1 = (ComboBox)sender; // Retrieve the selected item. String selectedString = (String)comboBox1.get_SelectedItem(); // Convert it to lowercase. selectedString = selectedString.ToLower(); // Declare the current size. float currentSize; // Switch on the selected item. // If Bigger is selected, get the current size from the // Size property and increase it. Reset the font to the // new size, using the current unit. if (selectedString.Equals("bigger")) { currentSize = label1.get_Font().get_Size(); currentSize += 2; label1.set_Font(new Font(label1.get_Font().get_Name(), currentSize, label1.get_Font().get_Style(), label1.get_Font().get_Unit())); } else { // If Smaller is selected, get the current size, in points, // and decrease it by 1. Reset the font with the new size // in points. if (selectedString.Equals("smaller")) { currentSize = label1.get_Font().get_SizeInPoints(); currentSize -= 1; label1.set_Font(new Font(label1.get_Font().get_Name(), currentSize, label1.get_Font().get_Style())); } } } //comboBox1_SelectedIndexChanged

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (Device, Font)
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)



Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (Device, FontDescription)
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)

Dim device As Device Dim description As FontDescription Dim instance As New Font(device, description)
public Font ( Device device, FontDescription description )
public: Font ( Device^ device, FontDescription description )
public Font ( Device device, FontDescription description )
- description
FontDescription 構造体。


Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (FontFamily, Single, FontStyle)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim family As FontFamily Dim emSize As Single Dim style As FontStyle Dim instance As New Font(family, emSize, style)



ボタンの Font プロパティを新しい太字スタイルの Font に設定する方法を次のコード例に示します。この例は、Button1 という名前のボタンを含んだ Windows フォームでの使用を意図してデザインされています。次のコードをフォームに貼り付け、Button1_Click メソッドをボタンの Click イベントに関連付けます。
Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click If Not Button1.Font.Style = FontStyle.Bold Then Button1.Font = New Font(FontFamily.GenericSansSerif, _ 12.0F, FontStyle.Bold) End If End Sub
private void Button1_Click(System.Object sender, System.EventArgs e) { if (Button1.Font.Style != FontStyle.Bold) Button1.Font = new Font(FontFamily.GenericSansSerif , 12.0F, FontStyle.Bold); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (FontFamily, Single, GraphicsUnit)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim family As FontFamily Dim emSize As Single Dim unit As GraphicsUnit Dim instance As New Font(family, emSize, unit)



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (FontFamily, Single, FontStyle, GraphicsUnit)
アセンブリ: System.Drawing (system.drawing.dll 内)

Public Sub New ( _ family As FontFamily, _ emSize As Single, _ style As FontStyle, _ unit As GraphicsUnit _ )
Dim family As FontFamily Dim emSize As Single Dim style As FontStyle Dim unit As GraphicsUnit Dim instance As New Font(family, emSize, style, unit)
public function Font ( family : FontFamily, emSize : float, style : FontStyle, unit : GraphicsUnit )


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (FontFamily, Single, FontStyle, GraphicsUnit, Byte)
アセンブリ: System.Drawing (system.drawing.dll 内)

Public Sub New ( _ family As FontFamily, _ emSize As Single, _ style As FontStyle, _ unit As GraphicsUnit, _ gdiCharSet As Byte _ )
Dim family As FontFamily Dim emSize As Single Dim style As FontStyle Dim unit As GraphicsUnit Dim gdiCharSet As Byte Dim instance As New Font(family, emSize, style, unit, gdiCharSet)
public Font ( FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet )
public: Font ( FontFamily^ family, float emSize, FontStyle style, GraphicsUnit unit, unsigned char gdiCharSet )
public Font ( FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet )
public function Font ( family : FontFamily, emSize : float, style : FontStyle, unit : GraphicsUnit, gdiCharSet : byte )



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (FontFamily, Single, FontStyle, GraphicsUnit, Byte, Boolean)
アセンブリ: System.Drawing (system.drawing.dll 内)

Public Sub New ( _ family As FontFamily, _ emSize As Single, _ style As FontStyle, _ unit As GraphicsUnit, _ gdiCharSet As Byte, _ gdiVerticalFont As Boolean _ )
Dim family As FontFamily Dim emSize As Single Dim style As FontStyle Dim unit As GraphicsUnit Dim gdiCharSet As Byte Dim gdiVerticalFont As Boolean Dim instance As New Font(family, emSize, style, unit, gdiCharSet, gdiVerticalFont)
public Font ( FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet, bool gdiVerticalFont )
public: Font ( FontFamily^ family, float emSize, FontStyle style, GraphicsUnit unit, unsigned char gdiCharSet, bool gdiVerticalFont )
public Font ( FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet, boolean gdiVerticalFont )
public function Font ( family : FontFamily, emSize : float, style : FontStyle, unit : GraphicsUnit, gdiCharSet : byte, gdiVerticalFont : boolean )



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ

名前 | 説明 |
---|---|
Font (IntPtr) | 指定したポインタを使用して、新しい Font を初期化します。 .NET Compact Framework によってサポートされています。 |
Font (Font, FontStyle) | 指定した既存の Font と FontStyle 列挙体を使用する、新しい Font を初期化します。 |
Font (FontFamily, Single) | 指定したサイズを使用して、新しい Font を初期化します。 |
Font (String, Single) | 指定したサイズを使用して、新しい Font を初期化します。 |
Font (FontFamily, Single, FontStyle) | 指定したサイズとスタイルを使用して、新しい Font を初期化します。 .NET Compact Framework によってサポートされています。 |
Font (FontFamily, Single, GraphicsUnit) | 指定したサイズと単位を使用して、新しい Font を初期化します。スタイルを FontStyle.Regular に設定します。 |
Font (String, Single, FontStyle) | 指定したサイズとスタイルを使用して、新しい Font を初期化します。 .NET Compact Framework によってサポートされています。 |
Font (String, Single, GraphicsUnit) | 指定したサイズと単位を使用して、新しい Font を初期化します。スタイルは FontStyle.Regular に設定されます。 |
Font (FontFamily, Single, FontStyle, GraphicsUnit) | 指定したサイズ、スタイル、および単位を使用して、新しい Font を初期化します。 |
Font (String, Single, FontStyle, GraphicsUnit) | 指定したサイズ、スタイル、および単位を使用して、新しい Font を初期化します。 |
Font (FontFamily, Single, FontStyle, GraphicsUnit, Byte) | 指定したサイズ、スタイル、単位、および文字セットを使用して、新しい Font を初期化します。 |
Font (String, Single, FontStyle, GraphicsUnit, Byte) | 指定したサイズ、スタイル、単位、および文字セットを使用して、新しい Font を初期化します。 |
Font (FontFamily, Single, FontStyle, GraphicsUnit, Byte, Boolean) | 指定したサイズ、スタイル、単位、および文字セットを使用して、新しい Font を初期化します。 |
Font (String, Single, FontStyle, GraphicsUnit, Byte, Boolean) | 指定したサイズ、スタイル、単位、および文字セットを使用して、新しい Font を初期化します。 |

Font コンストラクタ (String, Single, FontStyle)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim familyName As String Dim emSize As Single Dim style As FontStyle Dim instance As New Font(familyName, emSize, style)


結果として得られたフォントの Unit プロパティは Point に設定されます。Windows フォーム アプリケーションでは、TrueType フォントをサポートしています。また、OpenType フォントも制限付きでサポートしています。familyName パラメータが、アプリケーションを実行するコンピュータにインストールされていないフォントやサポートされていないフォントを指定した場合は、代わりに Microsoft Sans Serif が使用されます。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (IntPtr)
アセンブリ: System.Drawing (system.drawing.dll 内)


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (FontFamily, Single)
アセンブリ: System.Drawing (system.drawing.dll 内)




Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (String, Single, FontStyle, GraphicsUnit, Byte, Boolean)
アセンブリ: System.Drawing (system.drawing.dll 内)

Public Sub New ( _ familyName As String, _ emSize As Single, _ style As FontStyle, _ unit As GraphicsUnit, _ gdiCharSet As Byte, _ gdiVerticalFont As Boolean _ )
Dim familyName As String Dim emSize As Single Dim style As FontStyle Dim unit As GraphicsUnit Dim gdiCharSet As Byte Dim gdiVerticalFont As Boolean Dim instance As New Font(familyName, emSize, style, unit, gdiCharSet, gdiVerticalFont)
public Font ( string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet, bool gdiVerticalFont )
public: Font ( String^ familyName, float emSize, FontStyle style, GraphicsUnit unit, unsigned char gdiCharSet, bool gdiVerticalFont )
public Font ( String familyName, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet, boolean gdiVerticalFont )
public function Font ( familyName : String, emSize : float, style : FontStyle, unit : GraphicsUnit, gdiCharSet : byte, gdiVerticalFont : boolean )


gdiCharSet パラメータは、プラットフォーム SDK のヘッダー ファイル WinGDI.h で定義されたリストから値を取得します。familyName パラメータが、アプリケーションを実行するコンピュータにインストールされていないフォントやサポートされていないフォントを指定した場合は、代わりに Microsoft Sans Serif が使用されます。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (Font, FontStyle)
アセンブリ: System.Drawing (system.drawing.dll 内)


op_Inequality 演算子、Font コンストラクタ、および Bold プロパティを使用するコード例を次に示します。この例は、Button2 という名前のボタンを含んだ Windows フォームでの使用を意図してデザインされています。次のコードをフォームに貼り付け、Button2_Click メソッドをボタンの Click イベントに関連付けます。
Private Sub Button2_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button2.Click If (Color.op_Inequality(Me.BackColor, SystemColors.ControlDark)) Then Me.BackColor = SystemColors.ControlDark End If If Not (Me.Font.Bold) Then Me.Font = New Font(Me.Font, FontStyle.Bold) End If End Sub
private void Button2_Click(System.Object sender, System.EventArgs e) { if (this.BackColor != SystemColors.ControlDark) { this.BackColor = SystemColors.ControlDark; } if (!(this.Font.Bold)) { this.Font = new Font(this.Font, FontStyle.Bold); } }
void Button2_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ ) { if ( this->BackColor != SystemColors::ControlDark ) { this->BackColor = SystemColors::ControlDark; } if ( !(this->Font->Bold) ) { this->Font = gcnew System::Drawing::Font( this->Font,FontStyle::Bold ); } }
private void button2_Click(System.Object sender, System.EventArgs e) { if (!(this.get_BackColor().Equals(SystemColors.get_ControlDark()))) { this.set_BackColor(SystemColors.get_ControlDark()); } if (!(this.get_Font().get_Bold())) { this.set_Font(new Font(this.get_Font(), FontStyle.Bold)); } } //button2_Click

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (String, Single, FontStyle, GraphicsUnit)
アセンブリ: System.Drawing (system.drawing.dll 内)

Public Sub New ( _ familyName As String, _ emSize As Single, _ style As FontStyle, _ unit As GraphicsUnit _ )
Dim familyName As String Dim emSize As Single Dim style As FontStyle Dim unit As GraphicsUnit Dim instance As New Font(familyName, emSize, style, unit)
public function Font ( familyName : String, emSize : float, style : FontStyle, unit : GraphicsUnit )


Windows フォーム アプリケーションでは、TrueType フォントをサポートしています。また、OpenType フォントも制限付きでサポートしています。familyName パラメータが、アプリケーションを実行するコンピュータにインストールされていないフォントやサポートされていないフォントを指定した場合は、代わりに Microsoft Sans Serif が使用されます。

Font コンストラクタを使用する方法を次のコード例に示します。この例は、Windows フォームでの使用を意図してデザインされています。この例を実行するには、このコードを Button2 という名前のボタンが配置されているフォームに貼り付け、Button2_Click メソッドをボタンの Click イベントに関連付けます。
Private Sub Button2_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button2.Click Button2.Font = New Font(FontFamily.GenericMonospace, 12.0F, _ FontStyle.Italic, GraphicsUnit.Pixel) End Sub
private void Button2_Click(System.Object sender, System.EventArgs e) { Button2.Font = new Font(FontFamily.GenericMonospace, 12.0F, FontStyle.Italic, GraphicsUnit.Pixel); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (String, Single, GraphicsUnit)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim familyName As String Dim emSize As Single Dim unit As GraphicsUnit Dim instance As New Font(familyName, emSize, unit)



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ (String, Single, FontStyle, GraphicsUnit, Byte)
アセンブリ: System.Drawing (system.drawing.dll 内)

Public Sub New ( _ familyName As String, _ emSize As Single, _ style As FontStyle, _ unit As GraphicsUnit, _ gdiCharSet As Byte _ )
Dim familyName As String Dim emSize As Single Dim style As FontStyle Dim unit As GraphicsUnit Dim gdiCharSet As Byte Dim instance As New Font(familyName, emSize, style, unit, gdiCharSet)
public Font ( string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet )
public: Font ( String^ familyName, float emSize, FontStyle style, GraphicsUnit unit, unsigned char gdiCharSet )
public Font ( String familyName, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet )
public function Font ( familyName : String, emSize : float, style : FontStyle, unit : GraphicsUnit, gdiCharSet : byte )


gdiCharSet パラメータは、プラットフォーム SDK のヘッダー ファイル WinGDI.h で定義されたリストから値を取得します。Windows フォーム アプリケーションでは、TrueType フォントをサポートしています。また、OpenType フォントも制限付きでサポートしています。familyName パラメータが、アプリケーションを実行するコンピュータにインストールされていないフォントやサポートされていないフォントを指定した場合は、代わりに Microsoft Sans Serif が使用されます。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Font コンストラクタ

名前 | 説明 |
---|---|
Font (Device, Font) | 既存のフォントとデバイスを使用して、Font クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
Font (Device, FontDescription) | 既存のデバイスとフォントの記述を使用して、Font クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |

Font プロパティ
Font プロパティ

名前 | 説明 | |
---|---|---|
![]() | Bold | この Font が太字かどうかを示す値を取得します。 |
![]() | FontFamily | この Font に関連付けられている FontFamily を取得します。 |
![]() | GdiCharSet | この Font で使用する GDI 文字セットを指定するバイト値を取得します。 |
![]() | GdiVerticalFont | この Font が GDI 縦書きフォントから派生したフォントかどうかを示すブール値を取得します。 |
![]() | Height | フォントの行間を取得します。 |
![]() | IsSystemFont | フォントが SystemFonts のメンバかどうかを示す値を取得します。 |
![]() | Italic | この Font が斜体かどうかを示す値を取得します。 |
![]() ![]() ![]() | SizeInPoints | この Font の em サイズ (ポイント) を取得します。 |
![]() | Strikeout | この Font がフォントを通る水平線を指定するかどうかを示す値を取得します。 |
![]() ![]() | SystemFontName | IsSystemFont プロパティが true を返す場合は、システム フォントの名前を取得します。 |
![]() | Underline | この Font が下線付きかどうかを示す値を取得します。 |
![]() | Unit | この Font の長さの単位を取得します。 |

Font メソッド

名前 | 説明 | |
---|---|---|
![]() | Dispose | Font クラスによって使用されているすべてのリソースを解放します。 |
![]() | DrawText | オーバーロードされます。 書式設定されたテキストを描画します。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | MeasureString | 指定した Font オブジェクトを使用し、指定した StringFormat オブジェクトで書式指定して描画した場合の、指定した文字列を計測します。 |
![]() | OnLostDevice | ビデオ メモリ リソースへのすべての参照を解放し、すべての状態ブロックを削除します。 |
![]() | OnResetDevice | デバイスのリセット後に設定を再初期化します。 |
![]() | PreloadText | 書式設定されたテキストをビデオ メモリに読み込み、デバイスへのレンダリングの効率を向上させます。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

Font メソッド

名前 | 説明 | |
---|---|---|
![]() | Clone | 対象の Font の同一コピーを作成します。 |
![]() | CreateObjRef | リモート オブジェクトとの通信に使用するプロキシの生成に必要な情報をすべて格納しているオブジェクトを作成します。 ( MarshalByRefObject から継承されます。) |
![]() | Dispose | この Font によって使用されているすべてのリソースを解放します。 |
![]() | Equals | オーバーロードされます。 オーバーライドされます。 指定したオブジェクトがこの Font に等しいかどうかを判断します。 |
![]() | FromHdc | デバイス コンテキストを識別する、指定した Windows ハンドルから Font を作成します。 |
![]() | FromHfont | 指定した Windows ハンドルから Font を作成します。 |
![]() | FromLogFont | オーバーロードされます。 指定した GDI 論理フォント (LOGFONT) 構造体から Font を作成します。 |
![]() | GetHashCode | オーバーライドされます。 Font を処理するためのハッシュ コードを取得します。 |
![]() | GetHeight | オーバーロードされます。 このフォントの行間を返します。 |
![]() ![]() | GetLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。 ( MarshalByRefObject から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | InitializeLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、有効期間サービス オブジェクトを取得します。 ( MarshalByRefObject から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToHfont | この Font を識別するハンドルを返します。 |
![]() | ToLogFont | オーバーロードされます。 この Font から GDI 論理フォント (LOGFONT) 構造体を作成します。 |
![]() | ToString | オーバーライドされます。 この Font をユーザーが判読できる文字列形式で返します。 |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Runtime.Serialization.ISerializable.GetObjectData | SerializationInfo に、オブジェクトをシリアル化するために必要なデータを設定します。 |

Font メンバ
特定のデバイスで特定のフォントをレンダリングするために必要なテクスチャとリソースをカプセル化します。



名前 | 説明 | |
---|---|---|
![]() | Dispose | Font クラスによって使用されているすべてのリソースを解放します。 |
![]() | DrawText | オーバーロードされます。 書式設定されたテキストを描画します。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | MeasureString | 指定した Font オブジェクトを使用し、指定した StringFormat オブジェクトで書式指定して描画した場合の、指定した文字列を計測します。 |
![]() | OnLostDevice | ビデオ メモリ リソースへのすべての参照を解放し、すべての状態ブロックを削除します。 |
![]() | OnResetDevice | デバイスのリセット後に設定を再初期化します。 |
![]() | PreloadText | 書式設定されたテキストをビデオ メモリに読み込み、デバイスへのレンダリングの効率を向上させます。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |


Font メンバ
フォント フェイス、サイズ、スタイルの各属性など、テキストの特定の書式を定義します。このクラスは継承できません。


名前 | 説明 | |
---|---|---|
![]() | Bold | この Font が太字かどうかを示す値を取得します。 |
![]() | FontFamily | この Font に関連付けられている FontFamily を取得します。 |
![]() | GdiCharSet | この Font で使用する GDI 文字セットを指定するバイト値を取得します。 |
![]() | GdiVerticalFont | この Font が GDI 縦書きフォントから派生したフォントかどうかを示すブール値を取得します。 |
![]() | Height | フォントの行間を取得します。 |
![]() | IsSystemFont | フォントが SystemFonts のメンバかどうかを示す値を取得します。 |
![]() | Italic | この Font が斜体かどうかを示す値を取得します。 |
![]() ![]() ![]() | SizeInPoints | この Font の em サイズ (ポイント) を取得します。 |
![]() | Strikeout | この Font がフォントを通る水平線を指定するかどうかを示す値を取得します。 |
![]() ![]() | SystemFontName | IsSystemFont プロパティが true を返す場合は、システム フォントの名前を取得します。 |
![]() | Underline | この Font が下線付きかどうかを示す値を取得します。 |
![]() | Unit | この Font の長さの単位を取得します。 |

名前 | 説明 | |
---|---|---|
![]() | Clone | 対象の Font の同一コピーを作成します。 |
![]() | CreateObjRef | リモート オブジェクトとの通信に使用するプロキシの生成に必要な情報をすべて格納しているオブジェクトを作成します。 (MarshalByRefObject から継承されます。) |
![]() | Dispose | この Font によって使用されているすべてのリソースを解放します。 |
![]() | Equals | オーバーロードされます。 オーバーライドされます。 指定したオブジェクトがこの Font に等しいかどうかを判断します。 |
![]() | FromHdc | デバイス コンテキストを識別する、指定した Windows ハンドルから Font を作成します。 |
![]() | FromHfont | 指定した Windows ハンドルから Font を作成します。 |
![]() | FromLogFont | オーバーロードされます。 指定した GDI 論理フォント (LOGFONT) 構造体から Font を作成します。 |
![]() | GetHashCode | オーバーライドされます。 Font を処理するためのハッシュ コードを取得します。 |
![]() | GetHeight | オーバーロードされます。 このフォントの行間を返します。 |
![]() ![]() | GetLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。 (MarshalByRefObject から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | InitializeLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、有効期間サービス オブジェクトを取得します。 (MarshalByRefObject から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToHfont | この Font を識別するハンドルを返します。 |
![]() | ToLogFont | オーバーロードされます。 この Font から GDI 論理フォント (LOGFONT) 構造体を作成します。 |
![]() | ToString | オーバーライドされます。 この Font をユーザーが判読できる文字列形式で返します。 |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Runtime.Serialization.ISerializable.GetObjectData | SerializationInfo に、オブジェクトをシリアル化するために必要なデータを設定します。 |

Weblioに収録されているすべての辞書からFontを検索する場合は、下記のリンクをクリックしてください。

- Fontのページへのリンク