glyph
「glyph」の意味・「glyph」とは
「glyph」とは、文字や記号の一種である。特に、書体やフォントによって形状が変わる文字を指す。例えば、アルファベットの「A」は、書体によって形状が異なるが、これら全ては「A」のグリフとされる。また、絵文字やピクトグラムも一種のグリフとして扱われることがある。「glyph」の発音・読み方
「glyph」の発音は、IPA表記では /ɡlɪf/ となる。IPAのカタカナ読みでは「グリフ」となる。日本人が発音するカタカナ英語では「グリフ」と読む。この単語は発音によって意味や品詞が変わるものではない。「glyph」の定義を英語で解説
A glyph is a specific form of a character. It is a particular graphical representation, in a particular typeface, of an element of written language, which could be a grapheme, or part of a grapheme, or sometimes several graphemes in combination.「glyph」の類語
「glyph」の類語としては、「character」、「symbol」、「icon」などがある。これらは全て、何らかの情報や意味を表現するための記号や文字を指す言葉である。「glyph」に関連する用語・表現
「glyph」に関連する用語としては、「typeface」、「font」、「typography」などがある。これらは全て、文字のデザインや配置、書体など、文字を視覚的に表現するための要素を指す言葉である。「glyph」の例文
以下に、「glyph」を使用した例文を10個提示する。 1. The glyph for the letter "A" varies depending on the typeface.(文字"A"のグリフは書体によって異なる) 2. This font has a unique glyph for the numeral "4".(このフォントは独特な"4"のグリフを持っている) 3. The glyph for the ampersand is often very stylized.(アンパサンドのグリフはよくスタイリッシュにデザインされる) 4. The glyph for this Chinese character is very complex.(この中国語の文字のグリフは非常に複雑である) 5. The glyph for the emoji is different on each platform.(絵文字のグリフはプラットフォームごとに異なる) 6. The glyph for the letter "g" in this typeface is hard to read.(この書体の"g"のグリフは読みにくい) 7. The glyph for the dollar sign is universally recognized.(ドル記号のグリフは普遍的に認識されている) 8. The glyph for the copyright symbol is often very small.(著作権記号のグリフはよく非常に小さい) 9. The glyph for the letter "Q" in this font is very distinctive.(このフォントの"Q"のグリフは非常に特徴的である) 10. The glyph for the at sign varies greatly between typefaces.(アットマークのグリフは書体によって大きく異なる)Glyph クラス
アセンブリ: System.Design (system.design.dll 内)
構文
解説
Glyph は描画とヒット テストだけを目的としています。Glyph は、BehaviorService の装飾ウィンドウ コントロール上にレンダリングされるため、ウィンドウ ハンドル (HWND) はありません。それぞれの Glyph が、関連付けられた Behavior を持つことができます。ヒット テストの結果が正常だった Glyph では、新規または異なる Behavior を BehaviorService の動作スタックにプッシュできます。
関連付けられた Behavior を使用して独自の Glyph 基本クラスを作成する方法を次の例に示します。このコード例は、BehaviorService クラスのトピックで取り上げているコード例の一部分です。
Class MyGlyph Inherits Glyph Private control As Control Private behaviorSvc As _ System.Windows.Forms.Design.Behavior.BehaviorService Public Sub New(ByVal behaviorSvc As _ System.Windows.Forms.Design.Behavior.BehaviorService, _ ByVal control As Control) MyBase.New(New MyBehavior()) Me.behaviorSvc = behaviorSvc Me.control = control End Sub Public Overrides ReadOnly Property Bounds() As Rectangle Get ' Create a glyph that is 10x10 and sitting ' in the middle of the control. Glyph coordinates ' are in adorner window coordinates, so we must map ' using the behavior service. Dim edge As Point = behaviorSvc.ControlToAdornerWindow(control) Dim size As Size = control.Size Dim center As New Point(edge.X + size.Width / 2, edge.Y + _ size.Height / 2) Dim bounds1 As New Rectangle(center.X - 5, center.Y - 5, 10, 10) Return bounds1 End Get End Property Public Overrides Function GetHitTest(ByVal p As Point) As Cursor ' GetHitTest is called to see if the point is ' within this glyph. This gives us a chance to decide ' what cursor to show. Returning null from here means ' the mouse pointer is not currently inside of the glyph. ' Returning a valid cursor here indicates the pointer is ' inside the glyph,and also enables our Behavior property ' as the active behavior. If Bounds.Contains(p) Then Return Cursors.Hand End If Return Nothing End Function Public Overrides Sub Paint(ByVal pe As PaintEventArgs) ' Draw our glyph. It is simply a blue ellipse. pe.Graphics.FillEllipse(Brushes.Blue, Bounds) End Sub ' By providing our own behavior we can do something interesting ' when the user clicks or manipulates our glyph. Class MyBehavior Inherits System.Windows.Forms.Design.Behavior.Behavior Public Overrides Function OnMouseUp(ByVal g As Glyph, _ ByVal button As MouseButtons) As Boolean MessageBox.Show("Hey, you clicked the mouse here") Return True ' indicating we processed this event. End Function 'OnMouseUp End Class End Class
class MyGlyph : Glyph { Control control; BehaviorService behaviorSvc; public MyGlyph(BehaviorService behaviorSvc, Control control) : base(new MyBehavior()) { this.behaviorSvc = behaviorSvc; this.control = control; } public override Rectangle Bounds { get { // Create a glyph that is 10x10 and sitting // in the middle of the control. Glyph coordinates // are in adorner window coordinates, so we must map // using the behavior service. Point edge = behaviorSvc.ControlToAdornerWindow(control); Size size = control.Size; Point center = new Point(edge.X + (size.Width / 2), edge.Y + (size.Height / 2)); Rectangle bounds = new Rectangle( center.X - 5, center.Y - 5, 10, 10); return bounds; } } public override Cursor GetHitTest(Point p) { // GetHitTest is called to see if the point is // within this glyph. This gives us a chance to decide // what cursor to show. Returning null from here means // the mouse pointer is not currently inside of the glyph. // Returning a valid cursor here indicates the pointer is // inside the glyph, and also enables our Behavior property // as the active behavior. if (Bounds.Contains(p)) { return Cursors.Hand; } return null; } public override void Paint(PaintEventArgs pe) { // Draw our glyph. It is simply a blue ellipse. pe.Graphics.FillEllipse(Brushes.Blue, Bounds); } // By providing our own behavior we can do something interesting // when the user clicks or manipulates our glyph. class MyBehavior : Behavior { public override bool OnMouseUp(Glyph g, MouseButtons button) { MessageBox.Show("Hey, you clicked the mouse here"); return true; // indicating we processed this event. } } }
System.Windows.Forms.Design.Behavior.Glyph
System.Windows.Forms.Design.Behavior.ComponentGlyph
プラットフォーム
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Glyph コンストラクタ
アセンブリ: System.Design (system.design.dll 内)
構文
使用例
Glyph クラスの新しいインスタンスを初期化する方法を次の例に示します。このコード例は、BehaviorService クラスのトピックで取り上げているコード例の一部分です。
プラットフォーム
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Glyph プロパティ
Glyph メソッド
パブリック メソッド
名前 | 説明 | |
---|---|---|
Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) | |
GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) | |
GetHitTest | ヒット テストのロジックを提供します。 | |
GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) | |
Paint | 描画ロジックを提供します。 | |
ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) | |
ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |
名前 | 説明 | |
---|---|---|
Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) | |
MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) | |
SetBehavior | Glyph に関連付けられている Behavior を変更します。 |
Glyph メンバ
Adorner によって管理される単一のユーザー インターフェイス (UI) エンティティを表します。
Glyph データ型で公開されるメンバを以下の表に示します。
プロテクト コンストラクタ
パブリック プロパティ
パブリック メソッド
名前 | 説明 | |
---|---|---|
Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) | |
GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) | |
GetHitTest | ヒット テストのロジックを提供します。 | |
GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) | |
Paint | 描画ロジックを提供します。 | |
ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) | |
ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |
名前 | 説明 | |
---|---|---|
Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) | |
MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) | |
SetBehavior | Glyph に関連付けられている Behavior を変更します。 |
字体
- glyphのページへのリンク