skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class FontsRepository

Represents the fonts repository. It can be used to create new font objects and manage font registration for PDF documents.

Inheritance
System.Object
FontsRepository
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Fixed.Model.Fonts
Assembly: Telerik.Windows.Documents.Fixed.dll

Syntax

public static class FontsRepository

Properties

Courier

Gets the Courier font object.

Declaration
public static FontBase Courier { get; }
Property Value
FontBase

The Courier font instance.

CourierBold

Gets the Courier Bold font object.

Declaration
public static FontBase CourierBold { get; }
Property Value
FontBase

The Courier Bold font instance.

CourierBoldOblique

Gets the Courier Bold Oblique font object.

Declaration
public static FontBase CourierBoldOblique { get; }
Property Value
FontBase

The Courier Bold Oblique font instance.

CourierOblique

Gets the Courier Oblique font object.

Declaration
public static FontBase CourierOblique { get; }
Property Value
FontBase

The Courier Oblique font instance.

Helvetica

Gets the Helvetica font object.

Declaration
public static FontBase Helvetica { get; }
Property Value
FontBase

The Helvetica font instance.

HelveticaBold

Gets the Helvetica Bold font object.

Declaration
public static FontBase HelveticaBold { get; }
Property Value
FontBase

The Helvetica Bold font instance.

HelveticaBoldOblique

Gets the Helvetica Bold Oblique font object.

Declaration
public static FontBase HelveticaBoldOblique { get; }
Property Value
FontBase

The Helvetica Bold Oblique font instance.

HelveticaOblique

Gets the Helvetica Oblique font object.

Declaration
public static FontBase HelveticaOblique { get; }
Property Value
FontBase

The Helvetica Oblique font instance.

Symbol

Gets the Symbol font object.

Declaration
public static FontBase Symbol { get; }
Property Value
FontBase

The Symbol font instance.

TimesBold

Gets the Times Bold font object.

Declaration
public static FontBase TimesBold { get; }
Property Value
FontBase

The Times Bold font instance.

TimesBoldItalic

Gets the Times Bold Italic font object.

Declaration
public static FontBase TimesBoldItalic { get; }
Property Value
FontBase

The Times Bold Italic font instance.

TimesItalic

Gets the Times Italic font object.

Declaration
public static FontBase TimesItalic { get; }
Property Value
FontBase

The Times Italic font instance.

TimesRoman

Gets the Times Roman font object.

Declaration
public static FontBase TimesRoman { get; }
Property Value
FontBase

The Times Roman font instance.

ZapfDingbats

Gets the ZapfDingbats font object.

Declaration
public static FontBase ZapfDingbats { get; }
Property Value
FontBase

The ZapfDingbats font instance.

Methods

ClearRegisteredFonts()

Clears all registered custom fonts from the repository, resetting it to default state.

Declaration
public static void ClearRegisteredFonts()

RegisterFont(FontFamily, FontStyle, FontWeight, Byte[])

Registers a font with the specified font family, style, weight, and data for use in PDF documents.

Declaration
public static void RegisterFont(FontFamily fontFamily, FontStyle fontStyle, FontWeight fontWeight, byte[] data)
Parameters
System.Windows.Media.FontFamily fontFamily

The font family to register.

System.Windows.FontStyle fontStyle

The font style (normal, italic, etc.).

System.Windows.FontWeight fontWeight

The font weight (normal, bold, etc.).

System.Byte[] data

The binary font data.

ReplaceStandardFont(StandardFontNames, Byte[])

Changes the default implementation of a Standard Font with custom font data.

Declaration
public static void ReplaceStandardFont(StandardFontNames name, byte[] data)
Parameters
StandardFontNames name

The name of the standard font to be replaced.

System.Byte[] data

The binary font data to use as replacement.

Exceptions
NotSupportedFontException

Thrown when an invalid font name is passed or the font data is not a valid Type1 font.

TryCreateFont(FontFamily, FontStyle, FontWeight, out FontBase)

Tries to create a new font object based on the given font properties.

Declaration
public static bool TryCreateFont(FontFamily fontFamily, FontStyle fontStyle, FontWeight fontWeight, out FontBase font)
Parameters
System.Windows.Media.FontFamily fontFamily

The font family to create.

System.Windows.FontStyle fontStyle

The font style (normal, italic, etc.).

System.Windows.FontWeight fontWeight

The font weight (normal, bold, etc.).

FontBase font

When this method returns, contains the created font object if successful, or null if creation failed.

Returns
System.Boolean

True if the font was created successfully; otherwise, false.

TryCreateFont(FontFamily, out FontBase)

Tries to create a new font object with normal style and weight based on the given font family.

Declaration
public static bool TryCreateFont(FontFamily fontFamily, out FontBase font)
Parameters
System.Windows.Media.FontFamily fontFamily

The font family to create.

FontBase font

When this method returns, contains the created font object if successful, or null if creation failed.

Returns
System.Boolean

True if the font was created successfully; otherwise, false.

Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.