Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Struct

OfficeFontInfo

OfficeIMO.Drawing

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

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

Accepted by parameters 17

Constructors

OfficeFontInfo 2 overloads
public OfficeFontInfo(string? familyName, double size = 11, OfficeFontStyle style = Regular) #

Creates a font descriptor.

Parameters

familyName string? required
size double = 11 optional
style OfficeIMO.Drawing.OfficeFontStyle = Regular optional
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 string? required
size double required
face OfficeIMO.Drawing.OfficeFontFaceDescriptor required
decorations OfficeIMO.Drawing.OfficeFontStyle = Regular optional

Methods

Equals 2 overloads
public bool Equals(OfficeFontInfo other) #

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

Parameters

other OfficeIMO.Drawing.OfficeFontInfo required
An object to compare with this object.

Returns

bool true if the current object is equal to the other parameter; otherwise, false.
public override bool Equals(object? obj) #

Indicates whether this instance and a specified object are equal.

Parameters

obj object? required
The object to compare with the current instance.

Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.
public override int GetHashCode() #

Returns the hash code for this instance.

Returns

int A 32-bit signed integer that is the hash code for this instance.
public static bool op_Equality(OfficeFontInfo left, OfficeFontInfo right) #

Equality operator.

Parameters

left OfficeIMO.Drawing.OfficeFontInfo required
right OfficeIMO.Drawing.OfficeFontInfo required

Returns

bool
public static bool op_Inequality(OfficeFontInfo left, OfficeFontInfo right) #

Inequality operator.

Parameters

left OfficeIMO.Drawing.OfficeFontInfo required
right OfficeIMO.Drawing.OfficeFontInfo required

Returns

bool
public override string ToString() #

Returns the fully qualified type name of this instance.

Returns

string The fully qualified type name.
public OfficeFontInfo WithFace(OfficeFontFaceDescriptor face) #

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

Parameters

face OfficeIMO.Drawing.OfficeFontFaceDescriptor required
public OfficeFontInfo WithFamilyName(string? familyName) #

Creates a copy with a different family name.

Parameters

familyName string? required
public OfficeFontInfo WithSize(double size) #

Creates a copy with a different point size.

Parameters

size double required
public OfficeFontInfo WithStyle(OfficeFontStyle style) #

Creates a copy with different style flags.

Parameters

style OfficeIMO.Drawing.OfficeFontStyle required

Properties

public string FamilyName { get; } #

Font family name, when known.

public double Size { get; } #

Font size interpreted in the drawing or measurement context.

public OfficeFontStyle Style { get; } #

Font style flags.

public OfficeFontFaceDescriptor Face { get; } #

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

public bool IsBold { get; } #

Whether the descriptor includes bold styling.

public bool IsItalic { get; } #

Whether the descriptor includes italic styling.

public bool IsUnderline { get; } #

Whether the descriptor includes underline styling.

public bool IsStrikethrough { get; } #

Whether the descriptor includes strikethrough styling.

public static OfficeFontInfo Default { get; } #

Default Office font descriptor.