
# ISch_FontManager2 interface

The `ISch_FontManager2` interface represents the internal font manager in Schematic Editor that manages fonts for text based objects on schematic documents. The `ISch_FontManager2` is the same as [`ISch_FontManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md), but all the methods have the Safecall calling convention which is important for SDK purposes.

```csharp
public interface ISch_FontManager2
```

**Namespace:** SCH · **Assembly:** Altium.SDK.Interfaces

## Remarks

To have access to the [`ISch_FontManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md) interface, read [`SCH.GlobalVars.SchServer`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/GlobalVars.md#schserver);

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [Bold](#bold) | `bool` | get | This Bold property determines the Bold style for the font. |
| [DefaultHorizontalSysFontId](#defaulthorizontalsysfontid) | `int` | get |  |
| [DefaultVerticalSysFontId](#defaultverticalsysfontid) | `int` | get |  |
| [FontCount](#fontcount) | `int` | get | The `FontCount` property returns the number of fonts used in the computer system that the Altium Designer is currently residing on. |
| [FontName](#fontname) | `string` | get | This indexed `FontName` property returns the name of an indexed font as a string. |
| [Italic](#italic) | `bool` | get | This Italic property determines the Italic style for the font. |
| [Rotation](#rotation) | `int` | get | The Rotation property determines the orientation of the text object. |
| [SaveFlag](#saveflag) | `bool` | get |  |
| [Size](#size) | `int` | get | The Size property determines the font size. |
| [StrikeOut](#strikeout) | `bool` | get | The `StrikeOut` property determines whether the font is striked out or not. |
| [UnderLine](#underline) | `bool` | get | This `UnderLine` property determines whether the font is underlined or not. |

### Bold

This Bold property determines the Bold style for the font.

```csharp
bool GetState_Bold(int argnId);
```

**Type:** `bool` · **Access:** read-only · **Index:** `argnId` (`int`)

**See also:** [ISch_FontManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md), [ISch_FontManager2.GetFontID](#getfontid)

### DefaultHorizontalSysFontId

*No description yet.*

```csharp
int GetState_DefaultHorizontalSysFontId();
```

**Type:** `int` · **Access:** read-only

### DefaultVerticalSysFontId

*No description yet.*

```csharp
int GetState_DefaultVerticalSysFontId();
```

**Type:** `int` · **Access:** read-only

### FontCount

The `FontCount` property returns the number of fonts used in the computer system that the Altium Designer is currently residing on.

```csharp
int GetState_FontCount();
```

**Type:** `int` · **Access:** read-only

**See also:** [ISch_FontManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md)

### FontName

This indexed `FontName` property returns the name of an indexed font as a string. Every computer could have a different table of fonts used.

```csharp
string GetState_FontName(int argnId);
```

**Type:** `string` · **Access:** read-only · **Index:** `argnId` (`int`)

### Italic

This Italic property determines the Italic style for the font.

```csharp
bool GetState_Italic(int argnId);
```

**Type:** `bool` · **Access:** read-only · **Index:** `argnId` (`int`)

**See also:** [ISch_FontManager2.GetFontID](#getfontid)

### Rotation

The Rotation property determines the orientation of the text object. For ISch_Labels, it is necessary to set the Orientation property of these ISch_Labels as well as the Rotation property for the FontID variables.

```csharp
int GetState_Rotation(int argnId);
```

**Type:** `int` · **Access:** read-only · **Index:** `argnId` (`int`)

### SaveFlag

*No description yet.*

```csharp
bool GetState_SaveFlag(int argnId);
```

**Type:** `bool` · **Access:** read-only · **Index:** `argnId` (`int`)

### Size

The Size property determines the font size.

```csharp
int GetState_Size(int argnId);
```

**Type:** `int` · **Access:** read-only · **Index:** `argnId` (`int`)

**See also:** [ISch_FontManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md), [ISch_FontManager2.GetFontID](#getfontid)

### StrikeOut

The `StrikeOut` property determines whether the font is striked out or not.

```csharp
bool GetState_StrikeOut(int argnId);
```

**Type:** `bool` · **Access:** read-only · **Index:** `argnId` (`int`)

**See also:** [ISch_FontManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md), [ISch_FontManager2.GetFontID](#getfontid)

### UnderLine

This `UnderLine` property determines whether the font is underlined or not.

```csharp
bool GetState_UnderLine(int argnId);
```

**Type:** `bool` · **Access:** read-only · **Index:** `argnId` (`int`)

**See also:** [ISch_FontManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md), [ISch_FontManager2.GetFontID](#getfontid)

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [GetFontID](#getfontid) | `int` | This method retrieves the font ID of TFontID type that can be used to set the font style of a text based object such as a [`ISch_Label`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Label.md) object. |
| [GetFontSize](#getfontsize) | `int` |  |
| [GetFontSpec](#getfontspec) | `void` | Every font used in the Schematic document has its own FontID. |
| [Import_FromUser](#import_fromuser) | `bool` |  |
| [IsFontVertical](#isfontvertical) | `bool` | This method determines whether the font is vertically orientated or not. |

### GetFontID

This method retrieves the font ID of TFontID type that can be used to set the font style of a text based object such as a [`ISch_Label`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Label.md) object.

```csharp
int GetFontID(int argSize, int argRotation, bool argUnderline, bool argItalic, bool argBold, bool argStrikeOut, string argFontName);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argSize` | `int` | value |
| `argRotation` | `int` | value |
| `argUnderline` | `bool` | value |
| `argItalic` | `bool` | value |
| `argBold` | `bool` | value |
| `argStrikeOut` | `bool` | value |
| `argFontName` | `string` | value |

**Returns:** `int`

### GetFontSize

*No description yet.*

```csharp
int GetFontSize(int argFontID);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argFontID` | `int` | value |

**Returns:** `int`

### GetFontSpec

Every font used in the Schematic document has its own FontID. You can invoke the `GetFontSpec` method to retrieve font specifications for the supplied Font ID.

```csharp
void GetFontSpec(int argFontID, ref int argSize, ref int argRotation, ref bool argUnderline, ref bool argItalic, ref bool argBold, ref bool argStrikeOut, ref string argFontName);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argFontID` | `int` | value |
| `argSize` | `int` | ref |
| `argRotation` | `int` | ref |
| `argUnderline` | `bool` | ref |
| `argItalic` | `bool` | ref |
| `argBold` | `bool` | ref |
| `argStrikeOut` | `bool` | ref |
| `argFontName` | `string` | ref |

**Returns:** nothing (`void`)

### Import_FromUser

*No description yet.*

```csharp
bool Import_FromUser(ref int argFontID);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argFontID` | `int` | ref |

**Returns:** `bool`

### IsFontVertical

This method determines whether the font is vertically orientated or not.

```csharp
bool IsFontVertical(int argFontID);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argFontID` | `int` | value |

**Returns:** `bool`
