OfficeFontInfo
OfficeIMO.Drawing
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.
Returned or exposed by 9
- Property OfficeDrawingText.Font
- Method OfficeFontInfo.WithFace
- Method OfficeFontInfo.WithFamilyName
- Method OfficeFontInfo.WithSize
- Method OfficeFontInfo.WithStyle
- Property OfficeFontInfo.Default
- Property OfficeMathRenderOptions.Font
- Property OfficeTextMeasurementStyle.FontInfo
- Property OfficeTextMeasurer.FallbackFontInfo
Accepted by parameters 17
- Method OfficeDrawing.AddClippedPositionedText
- Method OfficeDrawing.AddClippedText
- Method OfficeDrawing.AddPositionedText
- Method OfficeDrawing.AddStyledText
- Method OfficeDrawing.AddText
- Method OfficeDrawing.AddTextBehindContent
- Method OfficeDrawing.AddVerticalText
- Constructor OfficeDrawingText.OfficeDrawingText
- Method OfficeFontInfo.Equals
- Method OfficeFontInfo.op_Equality
- Method OfficeFontInfo.op_Equality
- Method OfficeFontInfo.op_Inequality
- Method OfficeFontInfo.op_Inequality
- Method OfficeRasterCanvas.DrawText
- Method OfficeRasterCanvas.MeasureText
- Method OfficeTextMeasurer.Create
- Method OfficeTextMeasurer.CreateStyle
Constructors
public OfficeFontInfo(string? familyName, double size = 11, OfficeFontStyle style = Regular) #Creates a font descriptor.
Parameters
- familyName string?
- size double = 11
- style OfficeIMO.Drawing.OfficeFontStyle = Regular
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?
- size double
- face OfficeIMO.Drawing.OfficeFontFaceDescriptor
- decorations OfficeIMO.Drawing.OfficeFontStyle = Regular
Methods
public bool Equals(OfficeFontInfo other) #Indicates whether the current object is equal to another object of the same type.
Parameters
- other OfficeIMO.Drawing.OfficeFontInfo
- 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?
- 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
- right OfficeIMO.Drawing.OfficeFontInfo
Returns
boolpublic static bool op_Inequality(OfficeFontInfo left, OfficeFontInfo right) #Inequality operator.
Parameters
- left OfficeIMO.Drawing.OfficeFontInfo
- right OfficeIMO.Drawing.OfficeFontInfo
Returns
boolpublic 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
Returns
OfficeFontInfopublic OfficeFontInfo WithFamilyName(string? familyName) #Creates a copy with a different family name.
Parameters
- familyName string?
Returns
OfficeFontInfopublic OfficeFontInfo WithSize(double size) #Creates a copy with a different point size.
Parameters
- size double
Returns
OfficeFontInfopublic OfficeFontInfo WithStyle(OfficeFontStyle style) #Creates a copy with different style flags.
Parameters
- style OfficeIMO.Drawing.OfficeFontStyle
Returns
OfficeFontInfoInherited Methods
Properties
public double Size { get; } #Font size interpreted in the drawing or measurement context.
public OfficeFontFaceDescriptor Face { get; } #Numeric weight, width, and slant used consistently for measurement, painting, and export.
public bool IsUnderline { get; } #Whether the descriptor includes underline styling.
public bool IsStrikethrough { get; } #Whether the descriptor includes strikethrough styling.