Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Interface

IOfficeFontProgram

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers abstract

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

Accepted by parameters

Methods

public abstract Byte[] GetFontDataForShaping() #
Returns: 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) #
Returns: List<List<OfficePoint>>

Returns filled contours for a validated externally shaped run.

Parameters

text System.String requiredposition: 0
result OfficeIMO.Drawing.OfficeTextShapingResult requiredposition: 1
x System.Double requiredposition: 2
y System.Double requiredposition: 3
fontSize System.Double requiredposition: 4
public abstract List<List<OfficePoint>> GetTextContours(String text, Double x, Double y, Double fontSize) #
Returns: List<List<OfficePoint>>

Returns filled contours for the supplied text.

Parameters

text System.String requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
fontSize System.Double requiredposition: 3
public abstract Boolean HasGlyphs(String text) #
Returns: Boolean

Tests whether the selected program contains glyphs for every text element.

Parameters

text System.String requiredposition: 0
public abstract Double LineHeight(Double fontSize) #
Returns: Double

Returns the line height at the requested font size.

Parameters

fontSize System.Double requiredposition: 0
public abstract Double Measure(String text, Double fontSize) #
Returns: Double

Measures text at the requested font size.

Parameters

text System.String requiredposition: 0
fontSize System.Double requiredposition: 1
public abstract Double MeasureShapedText(String text, OfficeTextShapingResult result, Double fontSize) #
Returns: Double

Measures a validated externally shaped run.

Parameters

text System.String requiredposition: 0
result OfficeIMO.Drawing.OfficeTextShapingResult requiredposition: 1
fontSize System.Double requiredposition: 2
public abstract IReadOnlyList<Double> MeasureTextElements(IReadOnlyList<String> elements, Double fontSize) #
Returns: IReadOnlyList<Double>

Measures the supplied grapheme-safe text elements.

Parameters

elements System.Collections.Generic.IReadOnlyList{System.String} requiredposition: 0
fontSize System.Double requiredposition: 1
public abstract Boolean TryGetGlyphMetrics(Int32 scalar, out Int32 glyphId, out Int32 advanceWidth) #
Returns: Boolean

Maps one Unicode scalar to a glyph and design-unit advance.

Parameters

scalar System.Int32 requiredposition: 0
glyphId System.Int32@ requiredposition: 1
advanceWidth System.Int32@ requiredposition: 2

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.