
# ISch_FontManager interface

The `ISch_FontManager` interface represents the internal font manager in Schematic Editor that manages fonts for text based objects on schematic documents.

```csharp
public interface ISch_FontManager
```

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

## Remarks

To have access to the `ISch_FontManager` 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.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

### 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_FontManager.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.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.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.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`

**Example:** Give a rotated label a font with the same rotation.

```csharp
using SCH;

ISch_ServerInterface schServer = SCH.GlobalVars.SchServer;
ISch_Document schDoc = schServer?.GetCurrentSchDocument();
if (schDoc == null)
    return;
var aLabel = schServer.SchObjectFactory(TObjectId.eLabel, TObjectCreationMode.eCreate_GlobalCopy) as ISch_Label;
if (aLabel == null)
    return;

aLabel.SetState_Orientation(TRotationBy90.eRotate90);
aLabel.SetState_FontId(schServer.GetState_FontManager().GetFontID(14, 90, false, false, false, false, "Times New Roman"));
// Note eRotate90 for the Orientation property, and a 90 value as a parameter for the GetFontID method.
schDoc.RegisterSchObjectInContainer(aLabel);
```

### 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`

## Returned by

[ISch_ServerInterface.FontManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_ServerInterface.md#fontmanager)
