// ------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// ------------------------------------------------------------------------------
namespace Win32.Graphics.DirectWrite;
///
/// IDWriteFontFace2
[Guid("d8b768ff-64bc-4e66-982b-ec8e87f693f7")]
[NativeTypeName("struct IDWriteFontFace2 : IDWriteFontFace1")]
[NativeInheritance("IDWriteFontFace1")]
public unsafe partial struct IDWriteFontFace2 : INativeGuid
{
public static ref readonly Guid IID_IDWriteFontFace2
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan data = new byte[] {
0xFF, 0x68, 0xB7, 0xD8,
0xBC, 0x64,
0x66, 0x4E,
0x98,
0x2B,
0xEC,
0x8E,
0x87,
0xF6,
0x93,
0xF7
};
Debug.Assert(data.Length == Unsafe.SizeOf());
return ref Unsafe.As(ref MemoryMarshal.GetReference(data));
}
}
#if NET6_0_OR_GREATER
static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDWriteFontFace2));
#else
public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDWriteFontFace2));
#endif
public void** lpVtbl;
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(0)]
public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IUnknown*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(1)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IUnknown*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(2)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IUnknown*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)]
public new FontFaceType GetType()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)]
public HResult GetFiles(uint* numberOfFiles, IDWriteFontFile** fontFiles)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), numberOfFiles, fontFiles);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(5)]
public uint GetIndex()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(6)]
public FontSimulations GetSimulations()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(7)]
public Bool32 IsSymbolFont()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public void GetMetrics(FontMetrics* fontFaceMetrics)
{
((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), fontFaceMetrics);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(9)]
public ushort GetGlyphCount()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(10)]
public HResult GetDesignGlyphMetrics(ushort* glyphIndices, uint glyphCount, GlyphMetrics* glyphMetrics, Bool32 isSideways)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), glyphIndices, glyphCount, glyphMetrics, isSideways);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(11)]
public HResult GetGlyphIndices(uint* codePoints, uint codePointCount, ushort* glyphIndices)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), codePoints, codePointCount, glyphIndices);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(12)]
public HResult TryGetFontTable(uint openTypeTableTag, void** tableData, uint* tableSize, void** tableContext, Bool32* exists)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), openTypeTableTag, tableData, tableSize, tableContext, exists);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
public void ReleaseFontTable(void* tableContext)
{
((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), tableContext);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
public HResult GetGlyphRunOutline(float emSize, ushort* glyphIndices, float* glyphAdvances, GlyphOffset* glyphOffsets, uint glyphCount, Bool32 isSideways, Bool32 isRightToLeft, Graphics.Direct2D.Common.ID2D1SimplifiedGeometrySink* geometrySink)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, glyphIndices, glyphAdvances, glyphOffsets, glyphCount, isSideways, isRightToLeft, geometrySink);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(15)]
public HResult GetRecommendedRenderingMode(float emSize, float pixelsPerDip, MeasuringMode measuringMode, IDWriteRenderingParams* renderingParams, RenderingMode* renderingMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, measuringMode, renderingParams, renderingMode);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(16)]
public HResult GetGdiCompatibleMetrics(float emSize, float pixelsPerDip, Matrix3x2* transform, FontMetrics* fontFaceMetrics)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, fontFaceMetrics);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(17)]
public HResult GetGdiCompatibleGlyphMetrics(float emSize, float pixelsPerDip, Matrix3x2* transform, Bool32 useGdiNatural, ushort* glyphIndices, uint glyphCount, GlyphMetrics* glyphMetrics, Bool32 isSideways)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, useGdiNatural, glyphIndices, glyphCount, glyphMetrics, isSideways);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(18)]
public void GetMetrics(FontMetrics1* fontMetrics)
{
((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), fontMetrics);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(19)]
public HResult GetGdiCompatibleMetrics(float emSize, float pixelsPerDip, Matrix3x2* transform, FontMetrics1* fontMetrics)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, fontMetrics);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(20)]
public void GetCaretMetrics(CaretMetrics* caretMetrics)
{
((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), caretMetrics);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(21)]
public HResult GetUnicodeRanges(uint maxRangeCount, UnicodeRange* unicodeRanges, uint* actualRangeCount)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), maxRangeCount, unicodeRanges, actualRangeCount);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(22)]
public Bool32 IsMonospacedFont()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(23)]
public HResult GetDesignGlyphAdvances(uint glyphCount, ushort* glyphIndices, int* glyphAdvances, Bool32 isSideways)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), glyphCount, glyphIndices, glyphAdvances, isSideways);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(24)]
public HResult GetGdiCompatibleGlyphAdvances(float emSize, float pixelsPerDip, Matrix3x2* transform, Bool32 useGdiNatural, Bool32 isSideways, uint glyphCount, ushort* glyphIndices, int* glyphAdvances)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, useGdiNatural, isSideways, glyphCount, glyphIndices, glyphAdvances);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(25)]
public HResult GetKerningPairAdjustments(uint glyphCount, ushort* glyphIndices, int* glyphAdvanceAdjustments)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), glyphCount, glyphIndices, glyphAdvanceAdjustments);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(26)]
public Bool32 HasKerningPairs()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(27)]
public HResult GetRecommendedRenderingMode(float fontEmSize, float dpiX, float dpiY, Matrix3x2* transform, Bool32 isSideways, OutlineThreshold outlineThreshold, MeasuringMode measuringMode, RenderingMode* renderingMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), fontEmSize, dpiX, dpiY, transform, isSideways, outlineThreshold, measuringMode, renderingMode);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(28)]
public HResult GetVerticalGlyphVariants(uint glyphCount, ushort* nominalGlyphIndices, ushort* verticalGlyphIndices)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), glyphCount, nominalGlyphIndices, verticalGlyphIndices);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(29)]
public Bool32 HasVerticalGlyphVariants()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(30)]
public Bool32 IsColorFont()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(31)]
public uint GetColorPaletteCount()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(32)]
public uint GetPaletteEntryCount()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[32]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(33)]
public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, Color4** paletteEntries)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[33]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(34)]
public HResult GetRecommendedRenderingMode(float fontEmSize, float dpiX, float dpiY, Matrix3x2* transform, Bool32 isSideways, OutlineThreshold outlineThreshold, MeasuringMode measuringMode, IDWriteRenderingParams* renderingParams, RenderingMode* renderingMode, GridFitMode* gridFitMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), fontEmSize, dpiX, dpiY, transform, isSideways, outlineThreshold, measuringMode, renderingParams, renderingMode, gridFitMode);
}
}