API Reference
IOfficeFontProgram
Decoded font program used by OfficeIMO measurement and outline rendering. Implementations may be supplied by specialized packages to override the first-party engine.
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property OfficeFontFace.Program
- Property OfficeFontProgramLoadResult.Program
Accepted by parameters
Methods
public abstract Byte[] GetFontDataForShaping() #Byte[]Returns an independent font-data snapshot suitable for an external shaping provider.
public abstract List<List<OfficePoint>> GetShapedTextContours(String text, OfficeTextShapingResult result, Double x, Double y, Double fontSize) #List<List<OfficePoint>>Returns filled contours for a validated externally shaped run.
Parameters
- text System.String
- result OfficeIMO.Drawing.OfficeTextShapingResult
- x System.Double
- y System.Double
- fontSize System.Double
public abstract List<List<OfficePoint>> GetTextContours(String text, Double x, Double y, Double fontSize) #List<List<OfficePoint>>Returns filled contours for the supplied text.
Parameters
- text System.String
- x System.Double
- y System.Double
- fontSize System.Double
public abstract Boolean HasGlyphs(String text) #BooleanTests whether the selected program contains glyphs for every text element.
Parameters
- text System.String
public abstract Double LineHeight(Double fontSize) #DoubleReturns the line height at the requested font size.
Parameters
- fontSize System.Double
public abstract Double Measure(String text, Double fontSize) #DoubleMeasures text at the requested font size.
Parameters
- text System.String
- fontSize System.Double
public abstract Double MeasureShapedText(String text, OfficeTextShapingResult result, Double fontSize) #DoubleMeasures a validated externally shaped run.
Parameters
- text System.String
- result OfficeIMO.Drawing.OfficeTextShapingResult
- fontSize System.Double
public abstract IReadOnlyList<Double> MeasureTextElements(IReadOnlyList<String> elements, Double fontSize) #IReadOnlyList<Double>Measures the supplied grapheme-safe text elements.
Parameters
- elements System.Collections.Generic.IReadOnlyList{System.String}
- fontSize System.Double
public abstract Boolean TryGetGlyphMetrics(Int32 scalar, out Int32 glyphId, out Int32 advanceWidth) #BooleanMaps one Unicode scalar to a glyph and design-unit advance.
Parameters
- scalar System.Int32
- glyphId System.Int32@
- advanceWidth System.Int32@
Properties
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 Nullable<Int32> CollectionIndex { get; } #Selected collection face index, when the source is a font collection.
public abstract Int32 UnitsPerEm { get; } #Font design units per em.
public abstract Boolean IsOpenTypeCff { get; } #Whether the source uses CFF or CFF2 outlines.
public abstract Boolean 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.