 |
PdfFont Methods |
The PdfFont type exposes the following members.
Methods| | Name | Description |
|---|
 | Clone |
Creates a clone of this font, associated with the specified pdf document.
|
   | CreateCJKFont |
Creates a PdfFont from a standard Korean / Japanese / Chinese (CJK) font family.
Like CreateStandardFont(PdfStandardFont, Single), these fonts are
referenced by name (not embedded) — they ship with PDF/A-compliant readers, so the
output is expected to render on any conforming viewer.
|
  | CreateFromBytes |
Loads a TrueType / OpenType font from an in-memory byte array and creates a
PdfFont. Convenience wrapper around
CreateFromStream(Stream, Single); the font is subset-embedded into
the output.
|
   | CreateFromFile |
Loads a TrueType (.ttf) or OpenType (.otf) font from a file path and creates a
PdfFont. The font is subset-embedded into the output document — the
subset only contains glyphs that are actually used, keeping file size small.
This is the path to use for PDF/A and PDF/X output from scratch.
|
  | CreateFromStream |
Loads a TrueType / OpenType font from a Stream and creates a
PdfFont. The stream must be positioned at the start of the font
data and is read synchronously in full. The font is subset-embedded into the
output.
|
  | CreateFromSystemFont(PdfSystemFont) |
Resolves the system font described by systemFont and creates a
PdfFont. Equivalent to
CreateFromSystemFont(String, Single, PdfFontStyle) with the
descriptor's family / size / style.
|
   | CreateFromSystemFont(String, Single) |
Resolves a font installed on the host system by family name and creates a
PdfFont. Loads the actual TrueType / OpenType file via
PdfSystemFonts and subset-embeds it into the output document.
|
  | CreateFromSystemFont(String, Single, PdfFontStyle) |
Resolves a system font by family name + style and creates a PdfFont.
The font is subset-embedded into the output document.
|
   | CreateStandardFont |
Creates a PdfFont from a standard PDF font family and size.
|
 | GetCharWidth |
Gets the width of the specified character in points.
|
  | GetSystemFont |
Gets the system font this font was created from, or null when it did not come
from one.
|
 | GetTextSize |
Gets the size (width and height) in points of the specified string when rendered
with this font.
|
 | GetTextWidth |
Gets the width in points of the specified string.
|
Top
See Also