IOfficeFontProgram
OfficeIMO.Drawing
Decoded font program used by OfficeIMO measurement and outline rendering. Implementations may be supplied by specialized packages to override the first-party engine.
Usage
Explore 3 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
- Property OfficeFontFace.Program
- Property OfficeFontProgramLoadResult.Program
Accepted by parameters 1
Methods
public abstract byte[] GetFontDataForShaping() #Returns an independent font-data snapshot suitable for an external shaping provider.
Returns
byte[]public abstract List<List<OfficePoint>> GetShapedTextContours(string text, OfficeTextShapingResult result, double x, double y, double fontSize) #Returns filled contours for a validated externally shaped run.
Parameters
- text string
- result OfficeIMO.Drawing.OfficeTextShapingResult
- x double
- y double
- fontSize double
Returns
List<List<OfficePoint>>public abstract List<List<OfficePoint>> GetTextContours(string text, double x, double y, double fontSize) #Returns filled contours for the supplied text.
Parameters
- text string
- x double
- y double
- fontSize double
Returns
List<List<OfficePoint>>public abstract bool HasGlyphs(string text) #Tests whether the selected program contains glyphs for every text element.
Parameters
- text string
Returns
boolpublic abstract double LineHeight(double fontSize) #Returns the line height at the requested font size.
Parameters
- fontSize double
Returns
doublepublic abstract double Measure(string text, double fontSize) #Measures text at the requested font size.
Parameters
- text string
- fontSize double
Returns
doublepublic abstract double MeasureShapedText(string text, OfficeTextShapingResult result, double fontSize) #Measures a validated externally shaped run.
Parameters
- text string
- result OfficeIMO.Drawing.OfficeTextShapingResult
- fontSize double
Returns
doublepublic abstract IReadOnlyList<double> MeasureTextElements(IReadOnlyList<string> elements, double fontSize) #Measures the supplied grapheme-safe text elements.
Parameters
- elements System.Collections.Generic.IReadOnlyList<string>
- fontSize double
Returns
IReadOnlyList<double>public abstract bool TryGetGlyphMetrics(int scalar, out int glyphId, out int advanceWidth) #Maps one Unicode scalar to a glyph and design-unit advance.
Parameters
- scalar int
- glyphId int
- advanceWidth int
Returns
boolProperties
public abstract string Fingerprint { get; } #Stable provider-defined identity for the decoded program and selected instance. The value must change when rendering-relevant configuration, such as variable-font axes, changes.
public abstract string? DisplayName { get; } #Best available human-readable face name.
public abstract int? CollectionIndex { get; } #Selected collection face index, when the source is a font collection.
public abstract int UnitsPerEm { get; } #Font design units per em.
public abstract bool IsOpenTypeCff { get; } #Whether the source uses CFF or CFF2 outlines.
public abstract bool ProvidesComplexTextLayout { get; } #Whether measurement and contours already apply complete script shaping and bidirectional layout.
public abstract double LineSpacingRatio { get; } #Returns the face line-spacing ratio.