Class FontsRepository
Represents the fonts repository. It can be used to create new font objects and manage font registration for PDF documents.
Inheritance
Inherited Members
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. |