Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Struct

OfficeFontInfo

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Base ValueType
Implements
IEquatable<OfficeFontInfo>
Modifiers sealed

Small immutable font descriptor used by OfficeIMO packages without taking a dependency on a font engine.

Inheritance

  • ValueType
  • OfficeFontInfo

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

OfficeFontInfo 2 overloads
public OfficeFontInfo(String familyName, Double size = 11, OfficeFontStyle style = Regular) #

Creates a font descriptor.

Parameters

familyName System.String requiredposition: 0
size System.Double = 11 optionalposition: 1
style OfficeIMO.Drawing.OfficeFontStyle = Regular optionalposition: 2
public OfficeFontInfo(String familyName, Double size, OfficeFontFaceDescriptor face, OfficeFontStyle decorations = Regular) #

Creates a font with exact numeric face attributes and optional text decorations.

Parameters

familyName System.String requiredposition: 0
size System.Double requiredposition: 1
face OfficeIMO.Drawing.OfficeFontFaceDescriptor requiredposition: 2
decorations OfficeIMO.Drawing.OfficeFontStyle = Regular optionalposition: 3

Methods

Equals 2 overloads
public Boolean Equals(OfficeFontInfo other) #
Returns: Boolean

Indicates whether the current object is equal to another object of the same type.

Parameters

other OfficeIMO.Drawing.OfficeFontInfo requiredposition: 0
An object to compare with this object.

Returns

true if the current object is equal to the other parameter; otherwise, false.

public override Boolean Equals(Object obj) #
Returns: Boolean

Indicates whether this instance and a specified object are equal.

Parameters

obj System.Object requiredposition: 0
The object to compare with the current instance.

Returns

true if obj and this instance are the same type and represent the same value; otherwise, false.

public override Int32 GetHashCode() #
Returns: Int32

Returns the hash code for this instance.

Returns

A 32-bit signed integer that is the hash code for this instance.

public static Boolean op_Equality(OfficeFontInfo left, OfficeFontInfo right) #
Returns: Boolean

Equality operator.

Parameters

left OfficeIMO.Drawing.OfficeFontInfo requiredposition: 0
right OfficeIMO.Drawing.OfficeFontInfo requiredposition: 1
public static Boolean op_Inequality(OfficeFontInfo left, OfficeFontInfo right) #
Returns: Boolean

Inequality operator.

Parameters

left OfficeIMO.Drawing.OfficeFontInfo requiredposition: 0
right OfficeIMO.Drawing.OfficeFontInfo requiredposition: 1
public override String ToString() #
Returns: String

Returns the fully qualified type name of this instance.

Returns

The fully qualified type name.

public OfficeFontInfo WithFace(OfficeFontFaceDescriptor face) #
Returns: OfficeFontInfo

Creates a copy with exact face attributes, retaining text decorations.

Parameters

face OfficeIMO.Drawing.OfficeFontFaceDescriptor requiredposition: 0
public OfficeFontInfo WithFamilyName(String familyName) #
Returns: OfficeFontInfo

Creates a copy with a different family name.

Parameters

familyName System.String requiredposition: 0
public OfficeFontInfo WithSize(Double size) #
Returns: OfficeFontInfo

Creates a copy with a different point size.

Parameters

size System.Double requiredposition: 0
public OfficeFontInfo WithStyle(OfficeFontStyle style) #
Returns: OfficeFontInfo

Creates a copy with different style flags.

Parameters

style OfficeIMO.Drawing.OfficeFontStyle requiredposition: 0

Properties

public String FamilyName { get; } #

Font family name, when known.

public Double Size { get; } #

Font size in points.

public OfficeFontStyle Style { get; } #

Font style flags.

public OfficeFontFaceDescriptor Face { get; } #

Numeric weight, width, and slant used consistently for measurement, painting, and export.

public Boolean IsBold { get; } #

Whether the descriptor includes bold styling.

public Boolean IsItalic { get; } #

Whether the descriptor includes italic styling.

public Boolean IsUnderline { get; } #

Whether the descriptor includes underline styling.

public Boolean IsStrikethrough { get; } #

Whether the descriptor includes strikethrough styling.

public static OfficeFontInfo Default { get; } #

Default Office font descriptor.