Namespace: PdfSharp.Fonts
Resolves the 14 standard-fonts and/or fonts in existing documents.
public class DocumentFontResolver : IFontResolver, IFontResolverMarker
Inheritance Object → DocumentFontResolver
Implements IFontResolver, IFontResolverMarker
Creates a new instance of the DocumentFontResolver
public DocumentFontResolver(PdfDocument document)
document PdfDocument
Registers a new font
public static void Register(string fontName, Byte[] fontData, bool isBold, bool isItalic)
fontName String
The name of the font
fontData Byte[]
The font-data
isBold Boolean
Specifies, whether the font is bold
isItalic Boolean
Specifies, whether the font is italic
Gets the data for the specified font.
public Byte[] GetFont(string faceName)
faceName String
Name of the font
Byte[]
Font data or null, if no font with the specified name could be found
Get a FontResolverInfo for the specified font
public FontResolverInfo ResolveTypeface(string familyName, bool isBold, bool isItalic)
familyName String
Name of the font
isBold Boolean
isItalic Boolean
FontResolverInfo
A FontResolverInfo or null, if no font with the specified name could be found