Show / Hide Table of Contents

# Struct GameFontStyle

Describes a font based on game resource file.

##### Inherited Members

System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: Dalamud.Interface.GameFonts

###### Assembly: Dalamud.dll

##### Syntax

    public struct GameFontStyle

### Constructors

| Improve this Doc View Source

#### GameFontStyle(GameFontFamily, Single)

Initializes a new instance of the GameFontStyle struct.

##### Declaration

    public GameFontStyle(GameFontFamily family, float sizePx)

##### Parameters

Type | Name | Description
--- | --- | ---
GameFontFamily | family | Font family.
System.Single | sizePx | Size in pixels.

| Improve this Doc View Source

#### GameFontStyle(GameFontFamilyAndSize)

Initializes a new instance of the GameFontStyle struct.

##### Declaration

    public GameFontStyle(GameFontFamilyAndSize familyAndSize)

##### Parameters

Type | Name | Description
--- | --- | ---
GameFontFamilyAndSize | familyAndSize | Font family and size.

### Fields

| Improve this Doc View Source

#### FamilyAndSize

Font family of the font.

##### Declaration

    public GameFontFamilyAndSize FamilyAndSize

##### Field Value

Type | Description
--- | ---
GameFontFamilyAndSize |

| Improve this Doc View Source

#### SizePx

Size of the font in pixels unit.

##### Declaration

    public float SizePx

##### Field Value

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### SkewStrength

Skewedness of the font.

0 is unaltered. Greater than 1 will make upper part go rightwards. Less than 1 will make lower part go rightwards.

##### Declaration

    public float SkewStrength

##### Field Value

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### Weight

Weight of the font.

0 is unaltered. Any value greater than 0 will make it bolder.

##### Declaration

    public float Weight

##### Field Value

Type | Description
--- | ---
System.Single |

### Properties

| Improve this Doc View Source

#### BaseSizePt

Gets the base font size in point unit.

##### Declaration

    public readonly float BaseSizePt { get; }

##### Property Value

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### BaseSizePx

Gets the base font size in pixel unit.

##### Declaration

    public readonly float BaseSizePx { get; }

##### Property Value

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### BaseSkewStrength

Gets or sets the base skew strength.

##### Declaration

    public float BaseSkewStrength { get; set; }

##### Property Value

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### Bold

Gets or sets a value indicating whether this font is bold.

##### Declaration

    public bool Bold { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Family

Gets the font family.

##### Declaration

    public readonly GameFontFamily Family { get; }

##### Property Value

Type | Description
--- | ---
GameFontFamily |

| Improve this Doc View Source

#### FamilyWithMinimumSize

Gets the corresponding GameFontFamilyAndSize but with minimum possible font sizes.

##### Declaration

    public readonly GameFontFamilyAndSize FamilyWithMinimumSize { get; }

##### Property Value

Type | Description
--- | ---
GameFontFamilyAndSize |

| Improve this Doc View Source

#### Italic

Gets or sets a value indicating whether this font is italic.

##### Declaration

    public bool Italic { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### SizePt

Gets or sets the size of the font in points unit.

##### Declaration

    public float SizePt { get; set; }

##### Property Value

Type | Description
--- | ---
System.Single |

### Methods

| Improve this Doc View Source

#### CalculateBaseWidthAdjustment(FdtReader, FdtReader.FontTableEntry)

Calculates the adjustment to width resulting fron Weight and SkewStrength.

##### Declaration

    public int CalculateBaseWidthAdjustment(FdtReader reader, FdtReader.FontTableEntry glyph)

##### Parameters

Type | Name | Description
--- | --- | ---
FdtReader | reader | Font information.
FdtReader.FontTableEntry | glyph | Glyph.

##### Returns

Type | Description
--- | ---
System.Int32 | Width adjustment in pixel unit.

| Improve this Doc View Source

#### GetRecommendedFamilyAndSize(GameFontFamily, Single)

Gets the recommend GameFontFamilyAndSize given family and size.

##### Declaration

    public static GameFontFamilyAndSize GetRecommendedFamilyAndSize(GameFontFamily family, float size)

##### Parameters

Type | Name | Description
--- | --- | ---
GameFontFamily | family | Font family.
System.Single | size | Font size in points.

##### Returns

Type | Description
--- | ---
GameFontFamilyAndSize | Recommended GameFontFamilyAndSize.

| Improve this Doc View Source

#### ToString()

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String |

##### Overrides

System.ValueType.ToString()