font
「font」の意味・「font」とは
「font」は、印刷やデジタルメディアにおける文字のスタイルやデザインを指す言葉である。具体的には、文字の形状、大きさ、太さ、間隔など、文字を構成する要素全体を包括する概念である。例えば、Times New RomanやArial、Helveticaなどは、一般的によく知られているフォントの一部である。「font」の発音・読み方
「font」の発音は、国際音声記号(IPA)で /fɒnt/ と表記される。これをカタカナに置き換えると「フォント」となる。日本人が英語を発音する際のカタカナ表記も「フォント」である。なお、「font」は発音によって意味や品詞が変わる単語ではない。「font」の定義を英語で解説
A 'font' is a specific typeface of a certain size and style. It refers to the overall design of the characters, including their shape, size, weight, and spacing. For instance, Times New Roman, Arial, and Helvetica are examples of well-known fonts.「font」の類語
「font」の類語としては、「typeface」がある。しかし、「typeface」は「font」よりも広範な概念を指し、特定のスタイルやデザインを持つ文字の集合体を指す。例えば、Helveticaはtypefaceであり、Helvetica 12 point boldはfontである。「font」に関連する用語・表現
「font」に関連する用語としては、「serif」や「sans-serif」、「script」、「display」などがある。これらはフォントのカテゴリを表す言葉で、それぞれセリフ体、サンセリフ体、筆記体、ディスプレイ用のフォントを指す。「font」の例文
1. The font used in the document is Times New Roman.(その文書で使用されているフォントはタイムズ・ニュー・ローマンである。)2. Please change the font to Arial.(フォントをアリアルに変更してください。)
3. This font is too small to read.(このフォントは小さすぎて読めない。)
4. The font size is set to 12 points.(フォントサイズは12ポイントに設定されている。)
5. The designer chose a bold font for the title.(デザイナーはタイトルに太字のフォントを選んだ。)
6. The font color is set to black.(フォントの色は黒に設定されている。)
7. The font style is set to italic.(フォントスタイルはイタリックに設定されている。)
8. The font used in the logo is unique.(ロゴで使用されているフォントはユニークである。)
9. The font used for the subtitles is different from the one used for the main text.(字幕で使用されているフォントは本文で使用されているものとは異なる。)
10. The font used in this book is easy to read.(この本で使用されているフォントは読みやすい。)
フォント【font】
フォント
フォントとは、活字やコンピュータにおいて扱われる文字のうち、統一された書体や大きさの文字のセットのことである。
フォントは、単に字形の違いを指す「書体」と同じ意味で用いられる場合も多い。コンピュータ用語としては、特に文字の表示形式などを示す語として用いられることが多い。
初期のPCやプリンタでは、文字はビットマップフォントと呼ばれる点(ドット)の集合によって表現された。最初期に用いられていたフォントのサイズは8×8ドットでは、アルファベットや数字のみ表現可能であり、後に16×16ドットや24×24ドットのフォントサイズが登場したことにより、漢字のような複雑な文字も表現できるようになった。
ビットマットフォントは、ドット数の多寡にかかわらず、曲線部分にジャギと呼ばれるギザギザが表れたり、文字の拡大・縮小により字形が崩れたりする。これに対して、アウトラインフォントと呼ばれるフォント形式は、文字の輪郭(アウトライン)を関数として記録し、演算によって描画することにより、ビットマップフォントの持つジャギや形崩れといった難点を解消している。
アウトラインフォントは、ビットマップフォントに比べて表示・印字などの処理に時間がかかるが、PCの処理性能の向上に伴い、一般的なPCでもアウトラインフォントが用いられるようになった。これによって、PC上で表示・印字できるフォントの種類や大きさの自由度が格段に向上した。
アウトラインフォントの代表的な形式として、1984年にAdobe Systemsが開発したPostScriptを挙げることができる。PostScriptは商業印刷などにおいて盛んに利用され、DTPの普及に貢献した。また、1990年前後にAppleとMicrosoftによって共同開発されたTrueTypeフォントは、Mac OSやWindowsに標準的に搭載され、アウトラインフォントを一般ユーザーも利用できるものにした。今日では、1996年にAdobe SystemsとMicrosoftによってTrueTypeの後継フォントとして共同開発されたOpenTypeも普及しつつある。
文字デザインの観点からは、フォントは等幅フォントとプロポーショナルフォントに分類することができる。等幅フォントは、すべての文字の幅が均等なフォントである。フォントのサイズが同じであれば、どのフォントでも1行当たりの文字数が同じになる。一字一字が方形に近い日本語では栄えるが、文字によって横幅に大きな差のあるアルファベットや数字の場合、字間が開いて不自然に見える場合がある。また、等幅フォントに対して、文字ごとに最適な文字幅がデザインされているフォントはプロポーショナルフォントと呼ばれる。プロポーショナルフォントは、日本語を含めて多くの場合で見栄えが良くなるが、行ごとの文字数が不統一となり、横書き文書の場合は行の右端が不揃いになる。
<font> 〜 </font> フォントタグ
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 内)
構文
.NET Framework のセキュリティ
プラットフォーム
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 に、オブジェクトをシリアル化するために必要なデータを設定します。 |
フォント
(font から転送)
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2024/09/05 02:48 UTC 版)
フォント(英: font) は、本来「同じサイズで、書体デザインの同じ活字のひとそろい」を意味するが、現在では画面に表示したり、書籍など紙面に印刷したりするためにコンピュータ上で利用できるようにした書体データを指す。金属活字や写真植字など先行する印刷技術の歴史を踏まえる場合、データとしてのフォントは特にデジタルフォント(digital font)と区別して呼ぶ。これに対して活字や写植文字盤によるものをアナログフォント(analogue font)というレトロニムで呼ぶこともある[1]。
- 1 フォントとは
- 2 フォントの概要
font
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2021/08/01 15:42 UTC 版)
※この「font」の解説は、「メディアタイプ」の解説の一部です。
「font」を含む「メディアタイプ」の記事については、「メディアタイプ」の概要を参照ください。
- fontのページへのリンク