Public Member Functions | |
| Font (string filename, int size, FontStyle style) | |
| Font constructor (from filename, size, and style) | |
| Font (FontAlias alias, int size, FontStyle style) | |
| Font constructor (from separate name, size, and style) | |
| virtual Object | ShallowClone () |
| Font constructor (copied from another Font object) | |
| void | Dispose () |
| Frees unmanaged resources of Font. | |
| int | GetTextWidth (string text) |
| Calculates the width required to render the provided character string with this font (entire character string) | |
| int | GetTextWidth (string text, int offset, int len) |
| Calculates the width required to render the provided character string (part of a character string) | |
| CharMetrics[] | GetTextMetrics (string text) |
| Obtains metrics information of each character in the provided character string (entire character string) | |
| CharMetrics[] | GetTextMetrics (string text, int offset, int len) |
| Obtains metrics information of each character in the provided character string (part of the character string) | |
Protected Member Functions | |
| Font (Font font) | |
| Font constructor (copied from another Font object) | |
Properties | |
| string | Name [get] |
| Font name. | |
| int | Size [get] |
| Size. | |
| FontStyle | Style [get] |
| Style. | |
| FontMetrics | Metrics [get] |
| Font metrics. | |
Font.
Font constructor (copied from another Font object)
| font | Copy source Font object |
A separate Font object is copied to create a new Font object. However, the actual body of the Font is not copied and one unmanaged resource will be shared. To free an unmanaged resource of a Font , Dispose() must be called for all the copied Font objects.
| CharMetrics [] GetTextMetrics | ( | string | text | ) |
Obtains metrics information of each character in the provided character string (entire character string)
| text | Character string |
| CharMetrics [] GetTextMetrics | ( | string | text, |
| int | offset, | ||
| int | len | ||
| ) |
Obtains metrics information of each character in the provided character string (part of the character string)
| text | All of the character string |
| offset | Offset of the section to obtain the character string's metrics information |
| len | Length of the section to obtain the character string's metrics information |
| int GetTextWidth | ( | string | text | ) |
Calculates the width required to render the provided character string with this font (entire character string)
| text | Character string |
| int GetTextWidth | ( | string | text, |
| int | offset, | ||
| int | len | ||
| ) |
Calculates the width required to render the provided character string (part of a character string)
| text | All of the character string |
| offset | Offset of the section to be used for calculating the character string's width |
| len | Length of the section to be used for calculating the character string's width |
| virtual Object ShallowClone | ( | ) | [virtual] |
Font constructor (copied from another Font object)
| font | Copy source Font object |
A separate Font object is copied to create a new Font object. However, the actual body of the Font is not copied and one unmanaged resource will be shared. To free an unmanaged resource of a Font , Dispose() must be called for all the copied Font objects.