Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfEmbeddedFontFallbackSet

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
be6c300e4ab1 with working tree changes
Modifiers
sealed

Pairs embedded fallback candidates with generated PDF font slots used for rendering planned fallback runs.

Inheritance

  • object
  • PdfEmbeddedFontFallbackSet

Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 4

Constructors

PdfEmbeddedFontFallbackSet 2 overloads
public PdfEmbeddedFontFallbackSet(IEnumerable<PdfEmbeddedFontFallbackCandidate> candidates) #

Creates a reusable fallback set whose candidates are registered as named embedded families. Named fallback families do not consume the Helvetica, Times, or Courier compatibility slots, so they can coexist with document fonts that already use all three slots.

Parameters

candidates System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfEmbeddedFontFallbackCandidate> required
Fallback font candidates in priority order. Candidate names must be unique.
public PdfEmbeddedFontFallbackSet(IEnumerable<PdfEmbeddedFontFallbackCandidate> candidates, IEnumerable<PdfStandardFont> fontSlots) #

Creates a reusable fallback set from prioritized candidates and matching generated font slots.

Parameters

candidates System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfEmbeddedFontFallbackCandidate> required
Fallback font candidates in priority order.
fontSlots System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfStandardFont> required
Generated standard-font family slots ordered the same way as candidates.

Methods

public IReadOnlyList<PdfTextShapingDiagnostic> AnalyzeAdvancedTextLayout(string text, string source = "", PdfTextShapingMode shapingMode = UnicodeScalar) #

Finds advanced-layout warnings for text planned against this fallback set, including selected-font OpenType feature gaps.

Parameters

text string required
Text to inspect.
source string = "" optional
Optional caller-provided source label such as a block, field, sheet, slide, or converter area.
shapingMode OfficeIMO.Pdf.PdfTextShapingMode = UnicodeScalar optional
Text shaping mode to use when checking fallback font coverage.

Returns

IReadOnlyList<PdfTextShapingDiagnostic> Advanced text layout diagnostics in source order, with duplicate warning families collapsed.
PlanText 2 overloads
public PdfTextFallbackPlan PlanText(string text, string source) #

Plans fallback coverage for text using this set's prioritized candidates.

Parameters

text string required
Text to inspect.
source string required
Optional caller-provided source label such as a block, field, sheet, slide, or converter area.

Returns

PdfTextFallbackPlan A fallback plan with covered text segments and missing-glyph diagnostics.
public PdfTextFallbackPlan PlanText(string text, string source = "", PdfTextShapingMode shapingMode = UnicodeScalar) #

Plans fallback coverage with an explicit text shaping mode.

Parameters

text string required
source string = "" optional
shapingMode OfficeIMO.Pdf.PdfTextShapingMode = UnicodeScalar optional
PlanTextRuns 2 overloads
public IReadOnlyList<PdfTextRun> PlanTextRuns(string text, string source, PdfTextRun? styleTemplate) #

Plans text and converts a fully covered plan into styled rich text runs assigned to this set's generated font slots.

Parameters

text string required
Text to inspect and convert.
source string required
Optional caller-provided source label such as a block, field, sheet, slide, or converter area.
styleTemplate OfficeIMO.Pdf.PdfTextRun? required
Optional run whose styling is copied to each generated text run.

Returns

IReadOnlyList<PdfTextRun> Text runs that can be used with rich paragraphs, lists, tables, panels, and canvas text boxes.
public IReadOnlyList<PdfTextRun> PlanTextRuns(string text, string source = "", PdfTextRun? styleTemplate = null, PdfTextShapingMode shapingMode = UnicodeScalar) #

Plans text runs with an explicit text shaping mode.

Parameters

text string required
source string = "" optional
styleTemplate OfficeIMO.Pdf.PdfTextRun? = null optional
shapingMode OfficeIMO.Pdf.PdfTextShapingMode = UnicodeScalar optional

Returns

IReadOnlyList<PdfTextRun>
public PdfCreateOptions RegisterFonts(PdfCreateOptions options) #

Registers every fallback candidate into its generated font family slot, including bold and italic variants.

Parameters

options OfficeIMO.Pdf.PdfCreateOptions required
PDF options to configure.

Returns

PdfCreateOptions The supplied options for fluent chaining.
TryPlanTextRuns 2 overloads
public bool TryPlanTextRuns(string text, out IReadOnlyList<PdfTextRun> runs, string source, PdfTextRun? styleTemplate, PdfConversionReport? report, string converter) #

Plans text and returns renderable rich text runs only when every non-layout scalar is covered.

Parameters

text string required
Text to inspect and convert.
runs System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfTextRun> required
Renderable rich text runs when the plan is fully covered; otherwise an empty collection.
source string required
Optional caller-provided source label such as a block, field, sheet, slide, or converter area.
styleTemplate OfficeIMO.Pdf.PdfTextRun? required
Optional run whose styling is copied to each generated text run.
report OfficeIMO.Pdf.PdfConversionReport? required
Optional conversion report that receives missing-glyph diagnostics from incomplete plans.
converter string required
Converter or adapter name used when writing diagnostics to report.

Returns

bool true when runs contains a fully covered renderable plan; otherwise false.
public bool TryPlanTextRuns(string text, out IReadOnlyList<PdfTextRun> runs, string source = "", PdfTextRun? styleTemplate = null, PdfConversionReport? report = null, string converter = "OfficeIMO.Pdf", PdfTextShapingMode shapingMode = UnicodeScalar) #

Tries to plan renderable text runs with an explicit text shaping mode.

Parameters

text string required
runs System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfTextRun> required
source string = "" optional
styleTemplate OfficeIMO.Pdf.PdfTextRun? = null optional
report OfficeIMO.Pdf.PdfConversionReport? = null optional
converter string = "OfficeIMO.Pdf" optional
shapingMode OfficeIMO.Pdf.PdfTextShapingMode = UnicodeScalar optional

Returns

bool

Properties

public IReadOnlyList<PdfEmbeddedFontFallbackCandidate> Candidates { get; } #

Fallback font candidates in priority order.

public IReadOnlyList<PdfStandardFont> FontSlots { get; } #

Generated standard-font family slots ordered the same way as PdfEmbeddedFontFallbackSet.Candidates.

public IReadOnlyList<string> FontFamilyNames { get; } #

Named embedded font families ordered the same way as PdfEmbeddedFontFallbackSet.Candidates. This is populated when the fallback set was created without compatibility slots.

public bool UsesNamedFontFamilies { get; } #

True when fallback runs use named embedded font families instead of compatibility slots.