Table of Contents

Class FontFace2

Namespace
SharpDX.DirectWrite
Assembly
SharpDX.Direct2D1.dll
[Guid("d8b768ff-64bc-4e66-982b-ec8e87f693f7")]
public class FontFace2 : FontFace1
Inheritance
FontFace2
Derived
Inherited Members

Constructors

FontFace2(nint)

public FontFace2(nint nativePtr)

Parameters

nativePtr nint

Properties

ColorPaletteCount

Gets the number of color palettes defined by the font.

public int ColorPaletteCount { get; }

Property Value

int

IsColorFont

Allows you to determine if a color rendering path is potentially necessary.

public RawBool IsColorFont { get; }

Property Value

RawBool

PaletteEntryCount

Get the number of entries in each color palette.

public int PaletteEntryCount { get; }

Property Value

int

Methods

GetPaletteEntries(int, int, int, RawColor4[])

Gets color values from the font's color palette.

public void GetPaletteEntries(int colorPaletteIndex, int firstEntryIndex, int entryCount, RawColor4[] aletteEntriesRef)

Parameters

colorPaletteIndex int

Zero-based index of the color palette. If the font does not have a palette with the specified index, the method returns DWRITE_E_NOCOLOR.

firstEntryIndex int

Zero-based index of the first palette entry to read.

entryCount int

Number of palette entries to read.

aletteEntriesRef RawColor4[]

Array that receives the color values.

GetRecommendedRenderingMode(float, float, float, RawMatrix3x2?, RawBool, OutlineThreshold, MeasuringMode, RenderingParams, out RenderingMode, out GridFitMode)

Determines the recommended text rendering and grid-fit mode to be used based on the font, size, world transform, and measuring mode.

public void GetRecommendedRenderingMode(float fontEmSize, float dpiX, float dpiY, RawMatrix3x2? transform, RawBool isSideways, OutlineThreshold outlineThreshold, MeasuringMode measuringMode, RenderingParams renderingParams, out RenderingMode renderingMode, out GridFitMode gridFitMode)

Parameters

fontEmSize float

Logical font size in DIPs.

dpiX float

Number of pixels per logical inch in the horizontal direction.

dpiY float

Number of pixels per logical inch in the vertical direction.

transform RawMatrix3x2?

A SharpDX.Mathematics.Interop.RawMatrix3x2 structure that describes the world transform.

isSideways RawBool

Specifies whether the font is sideways. TRUE if the font is sideways; otherwise, SharpDX.Result.False.

outlineThreshold OutlineThreshold

A OutlineThreshold-typed value that specifies the quality of the graphics system's outline rendering, affects the size threshold above which outline rendering is used.

measuringMode MeasuringMode

A MeasuringMode-typed value that specifies the method used to measure during text layout. For proper glyph spacing, this method returns a rendering mode that is compatible with the specified measuring mode.

renderingParams RenderingParams

A reference to a RenderingParams interface for the rendering parameters object. This parameter is necessary in case the rendering parameters object overrides the rendering mode.

renderingMode RenderingMode

A reference to a variable that receives a RenderingMode-typed value for the recommended rendering mode.

gridFitMode GridFitMode

A reference to a variable that receives a GridFitMode-typed value for the recommended grid-fit mode.

Operators

explicit operator FontFace2(nint)

public static explicit operator FontFace2(nint nativePtr)

Parameters

nativePtr nint

Returns

FontFace2