Struct FontFamily
Defines a group of type faces having a similar basic design and certain variations in styles.
Implements
Inherited Members
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public struct FontFamily : IEquatable<FontFamily>
Properties
| Improve this Doc View SourceCulture
Gets the culture this instance was extracted against.
Declaration
public readonly CultureInfo Culture { get; }
Property Value
Type | Description |
---|---|
CultureInfo |
Name
Gets the name.
Declaration
public readonly string Name { get; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceCreateFont(Single)
Create a new instance of the Font for the named font family with regular styling.
Declaration
public Font CreateFont(float size)
Parameters
Type | Name | Description |
---|---|---|
Single | size | The size of the font in PT units. |
Returns
Type | Description |
---|---|
Font | The new Font. |
CreateFont(Single, FontStyle)
Create a new instance of the Font for the named font family.
Declaration
public Font CreateFont(float size, FontStyle style)
Parameters
Type | Name | Description |
---|---|---|
Single | size | The size of the font in PT units. |
FontStyle | style | The font style. |
Returns
Type | Description |
---|---|
Font | The new Font. |
Equals(FontFamily)
Declaration
public bool Equals(FontFamily other)
Parameters
Type | Name | Description |
---|---|---|
FontFamily | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetAvailableStyles()
Gets the collection of FontStyle that are currently available.
Declaration
public IEnumerable<FontStyle> GetAvailableStyles()
Returns
Type | Description |
---|---|
IEnumerable<FontStyle> | The IEnumerable<T>. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceTryGetPaths(out IEnumerable<String>)
Gets the collection of filesystem paths to the font family sources.
Declaration
public bool TryGetPaths(out IEnumerable<string> paths)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | paths | When this method returns, contains the filesystem paths to the font family sources, if the path exists; otherwise, an empty value for the type of the paths parameter. This parameter is passed uninitialized. |
Returns
Type | Description |
---|---|
Boolean | true if the FontFamily was created via filesystem paths; otherwise, false. |
Operators
| Improve this Doc View SourceEquality(FontFamily, FontFamily)
Compares two FontFamily objects for equality.
Declaration
public static bool operator ==(FontFamily left, FontFamily right)
Parameters
Type | Name | Description |
---|---|---|
FontFamily | left | The FontFamily on the left side of the operand. |
FontFamily | right | The FontFamily on the right side of the operand. |
Returns
Type | Description |
---|---|
Boolean | true if the current left is equal to the |
Inequality(FontFamily, FontFamily)
Compares two FontFamily objects for inequality.
Declaration
public static bool operator !=(FontFamily left, FontFamily right)
Parameters
Type | Name | Description |
---|---|---|
FontFamily | left | The FontFamily on the left side of the operand. |
FontFamily | right | The FontFamily on the right side of the operand. |
Returns
Type | Description |
---|---|
Boolean | true if the current left is unequal to the |