Class Font
- Namespace
- SharpDX.DirectWrite
- Assembly
- SharpDX.Direct2D1.dll
[Guid("acd16696-8c14-4f5d-877e-fe3fc1d32737")]
public class Font : ComObject
- Inheritance
-
Font
- Derived
Constructors
Font(nint)
public Font(nint nativePtr)
Parameters
nativePtr
nint
Properties
FaceNames
Gets a localized strings collection containing the face names for the font (such as Regular or Bold), indexed by locale name.
public LocalizedStrings FaceNames { get; }
Property Value
FontFamily
Gets the font family to which the specified font belongs.
public FontFamily FontFamily { get; }
Property Value
IsSymbolFont
Determines whether the font is a symbol font.
public RawBool IsSymbolFont { get; }
Property Value
- RawBool
Metrics
Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.
public FontMetrics Metrics { get; }
Property Value
Simulations
Gets a value that indicates what simulations are applied to the specified font.
public FontSimulations Simulations { get; }
Property Value
Stretch
Gets the stretch, or width, of the specified font.
public FontStretch Stretch { get; }
Property Value
Style
Gets the style, or slope, of the specified font.
public FontStyle Style { get; }
Property Value
Weight
Gets the weight, or stroke thickness, of the specified font.
public FontWeight Weight { get; }
Property Value
Methods
GetInformationalStrings(InformationalStringId, out LocalizedStrings)
Gets a localized strings collection containing the specified informational strings, indexed by locale name.
public RawBool GetInformationalStrings(InformationalStringId informationalStringID, out LocalizedStrings informationalStrings)
Parameters
informationalStringID
InformationalStringIdA value that identifies the informational string to get. For example, DWRITE_INFORMATIONAL_STRING_DESCRIPTION specifies a string that contains a description of the font.
informationalStrings
LocalizedStringsWhen this method returns, contains an address of a reference to the newly created localized strings object.
Returns
- RawBool
When this method returns, TRUE if the font contains the specified string ID; otherwise, SharpDX.Result.False.
Remarks
If the font does not contain the string specified by informationalStringID, the return value is SharpDX.Result.Ok but informationalStrings receives a null
reference and exists receives the value SharpDX.Result.False.
HasCharacter(int)
Determines whether the font supports a specified character.
public RawBool HasCharacter(int unicodeValue)
Parameters
unicodeValue
intA Unicode (UCS-4) character value for the method to inspect.
Returns
- RawBool
When this method returns, TRUE if the font supports the specified character; otherwise, SharpDX.Result.False.
Operators
explicit operator Font(nint)
public static explicit operator Font(nint nativePtr)
Parameters
nativePtr
nint