Class InlinedFont
Namespace: PdfToSvg
Assembly: IronPdf.dll
Syntax
public class InlinedFont : Font
When converting a PDF page to SVG, InlinedFont embeds the full font data directly into the SVG output so that text renders correctly on any viewer without relying on system fonts. Constructed from a SourceFont, it extends the base Font type and exposes a FontFamily property that returns the CSS-compatible family name used in the generated SVG markup.
InlinedFont(SourceFont font) is the single constructor: pass a SourceFont extracted during PDF-to-SVG conversion and the object takes responsibility for serializing that font's data inline. The FontFamily property (an override of the base Font member) returns the string name that appears in the SVG font-family attribute, keeping the rendered glyphs tied to the correct typeface even when the SVG is viewed in isolation.
Choosing InlinedFont over a referenced font trades a slightly larger SVG file for complete portability: the SVG carries everything it needs to display text faithfully. This matters for archival output, email attachments, or any context where external font hosting is unavailable. The PdfToSvg namespace handles the conversion pipeline, and InlinedFont sits at the point where font fidelity is locked in before the SVG bytes are written.
using PdfToSvg;
// SourceFont is supplied by the conversion pipeline; InlinedFont wraps it.
var inlined = new InlinedFont(sourceFont);
string family = inlined.FontFamily; // e.g. "Arial" - used in SVG font-familyFor broader PDF-to-SVG conversion options, see the IronPDF documentation and the PDF to SVG how-to guide.
Constructors
InlinedFont(SourceFont)
Declaration
public InlinedFont(SourceFont font)
Parameters
| Type | Name | Description |
|---|---|---|
| SourceFont | font |
Properties
FontFamily
Declaration
public override string FontFamily { get; }
Property Value
| Type | Description |
|---|---|
| System.String |