PdfEmbeddedFontFallbackSet
OfficeIMO.Pdf
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.
Returned or exposed by 2
Accepted by parameters 4
Constructors
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>
- 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>
- Fallback font candidates in priority order.
- fontSlots System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfStandardFont>
- 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
- Text to inspect.
- source string = ""
- Optional caller-provided source label such as a block, field, sheet, slide, or converter area.
- shapingMode OfficeIMO.Pdf.PdfTextShapingMode = UnicodeScalar
- 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.public PdfTextFallbackPlan PlanText(string text, string source) #Plans fallback coverage for text using this set's prioritized candidates.
Parameters
- text string
- Text to inspect.
- source string
- 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
- source string = ""
- shapingMode OfficeIMO.Pdf.PdfTextShapingMode = UnicodeScalar
Returns
PdfTextFallbackPlanpublic 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
- Text to inspect and convert.
- source string
- Optional caller-provided source label such as a block, field, sheet, slide, or converter area.
- styleTemplate OfficeIMO.Pdf.PdfTextRun?
- 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
- source string = ""
- styleTemplate OfficeIMO.Pdf.PdfTextRun? = null
- shapingMode OfficeIMO.Pdf.PdfTextShapingMode = UnicodeScalar
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
- PDF options to configure.
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
- Text to inspect and convert.
- runs System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfTextRun>
- Renderable rich text runs when the plan is fully covered; otherwise an empty collection.
- source string
- Optional caller-provided source label such as a block, field, sheet, slide, or converter area.
- styleTemplate OfficeIMO.Pdf.PdfTextRun?
- Optional run whose styling is copied to each generated text run.
- report OfficeIMO.Pdf.PdfConversionReport?
- Optional conversion report that receives missing-glyph diagnostics from incomplete plans.
- converter string
- 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
- runs System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfTextRun>
- source string = ""
- styleTemplate OfficeIMO.Pdf.PdfTextRun? = null
- report OfficeIMO.Pdf.PdfConversionReport? = null
- converter string = "OfficeIMO.Pdf"
- shapingMode OfficeIMO.Pdf.PdfTextShapingMode = UnicodeScalar
Returns
boolInherited Methods
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.