OfficeFontFaceDescriptor
OfficeIMO.Drawing
CSS-compatible face attributes used when selecting among registered font faces.
Inheritance
- ValueType
- OfficeFontFaceDescriptor
Usage
Explore 17 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 5
- Property OfficeFontFace.Descriptor
- Method OfficeFontFaceDescriptor.FromStyle
- Property OfficeFontFaceDescriptor.Regular
- Property OfficeFontInfo.Face
- Property OfficeTrueTypeFont.FaceDescriptor
Accepted by parameters 12
- Method OfficeFontFaceCollection.Add
- Method OfficeFontFaceCollection.PlanFallbackRuns
- Method OfficeFontFaceCollection.TryAdd
- Method OfficeFontFaceCollection.TryResolveFaceForText
- Method OfficeFontFaceDescriptor.Equals
- Method OfficeFontFaceDescriptor.op_Equality
- Method OfficeFontFaceDescriptor.op_Equality
- Method OfficeFontFaceDescriptor.op_Inequality
- Method OfficeFontFaceDescriptor.op_Inequality
- Constructor OfficeFontInfo.OfficeFontInfo
- Method OfficeFontInfo.WithFace
- Method OfficeTrueTypeFont.TryLoadFontFamilyForText
Constructors
public OfficeFontFaceDescriptor(int weight = 400, double stretchPercent = 100, OfficeFontSlant slant = Normal, double obliqueAngleDegrees = 14) #Creates a face descriptor.
Parameters
- weight int = 400
- Numeric font weight from 1 through 1000.
- stretchPercent double = 100
- Face width as a percentage of normal width.
- slant OfficeIMO.Drawing.OfficeFontSlant = Normal
- Normal, italic, or oblique face classification.
- obliqueAngleDegrees double = 14
- Oblique angle in degrees when slant is oblique.
Methods
public bool Equals(OfficeFontFaceDescriptor other) #Indicates whether the current object is equal to another object of the same type.
Parameters
- other OfficeIMO.Drawing.OfficeFontFaceDescriptor
- 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 static OfficeFontFaceDescriptor FromStyle(OfficeFontStyle style) #Creates a descriptor matching the legacy bold/italic flags.
Parameters
- style OfficeIMO.Drawing.OfficeFontStyle
Returns
OfficeFontFaceDescriptorpublic 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(OfficeFontFaceDescriptor left, OfficeFontFaceDescriptor right) #Equality operator.
Parameters
- left OfficeIMO.Drawing.OfficeFontFaceDescriptor
- right OfficeIMO.Drawing.OfficeFontFaceDescriptor
Returns
boolpublic static bool op_Inequality(OfficeFontFaceDescriptor left, OfficeFontFaceDescriptor right) #Inequality operator.
Parameters
- left OfficeIMO.Drawing.OfficeFontFaceDescriptor
- right OfficeIMO.Drawing.OfficeFontFaceDescriptor
Returns
boolpublic OfficeFontStyle ToStyle() #Compatibility style flags inferred from the numeric face attributes.
Returns
OfficeFontStyleInherited Methods
Properties
public double StretchPercent { get; } #Face width as a percentage of normal width.
public OfficeFontSlant Slant { get; } #Normal, italic, or oblique face classification.
public double ObliqueAngleDegrees { get; } #Oblique face angle in degrees, or zero for normal and italic faces.
public static OfficeFontFaceDescriptor Regular { get; } #Regular 400-weight, normal-width, upright face.