## FontRepository::OpenFont(const System::SharedPtr\<System::IO::Stream\>\&, FontTypes) method


Opens font with specified font stream.

```cpp
static System::SharedPtr<Font> Aspose::Pdf::Text::FontRepository::OpenFont(const System::SharedPtr<System::IO::Stream> &fontStream, FontTypes fontType)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fontStream | const System::SharedPtr\<System::IO::Stream\>\& | [Font](../../font/) stream. |
| fontType | FontTypes | [Font](../../font/) type value. |

### ReturnValue

[Font](../../font/) object.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Font](../../font/)
* Class [Stream](../../../system.io/stream/)
* Enum [FontTypes](../../fonttypes/)
* Class [FontRepository](../)
* Namespace [Aspose::Pdf::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## FontRepository::OpenFont(const System::String\&) method


Opens font with specified font file path.

```cpp
static System::SharedPtr<Font> Aspose::Pdf::Text::FontRepository::OpenFont(const System::String &fontFilePath)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fontFilePath | const System::String\& | [Font](../../font/) file path. |

### ReturnValue

[Font](../../font/) object.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Font](../../font/)
* Class [String](../../../system/string/)
* Class [FontRepository](../)
* Namespace [Aspose::Pdf::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## FontRepository::OpenFont(const System::String\&, const System::String\&) method


Opens font with specified font file path and metrics file path.

```cpp
static System::SharedPtr<Font> Aspose::Pdf::Text::FontRepository::OpenFont(const System::String &fontFilePath, const System::String &metricsFilePath)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fontFilePath | const System::String\& | [Font](../../font/) file path. |
| metricsFilePath | const System::String\& | [Font](../../font/) metrics file patrh. |

### ReturnValue

[Font](../../font/) object.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Font](../../font/)
* Class [String](../../../system/string/)
* Class [FontRepository](../)
* Namespace [Aspose::Pdf::Text](../../)
* Library [Aspose.PDF for C++](../../../)
