Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Interface

IOfficeFontProgram

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
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

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

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 required
result OfficeIMO.Drawing.OfficeTextShapingResult required
x double required
y double required
fontSize double required

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 required
x double required
y double required
fontSize double required

Returns

List<List<OfficePoint>>
public abstract bool HasGlyphs(string text) #

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

Parameters

text string required

Returns

bool
public abstract double LineHeight(double fontSize) #

Returns the line height at the requested font size.

Parameters

fontSize double required

Returns

double
public abstract double Measure(string text, double fontSize) #

Measures text at the requested font size.

Parameters

text string required
fontSize double required

Returns

double
public abstract double MeasureShapedText(string text, OfficeTextShapingResult result, double fontSize) #

Measures a validated externally shaped run.

Parameters

text string required
result OfficeIMO.Drawing.OfficeTextShapingResult required
fontSize double required

Returns

double
public abstract IReadOnlyList<double> MeasureTextElements(IReadOnlyList<string> elements, double fontSize) #

Measures the supplied grapheme-safe text elements.

Parameters

elements System.Collections.Generic.IReadOnlyList<string> required
fontSize double required

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 required
glyphId int required
advanceWidth int required

Returns

bool

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 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.