// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

namespace Win32.Graphics.DirectWrite;

/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2"]/*' />
/// <unmanaged>IDWriteFontFace2</unmanaged>
[Guid("d8b768ff-64bc-4e66-982b-ec8e87f693f7")]
[NativeTypeName("struct IDWriteFontFace2 : IDWriteFontFace1")]
[NativeInheritance("IDWriteFontFace1")]
public unsafe partial struct IDWriteFontFace2 : IDWriteFontFace2.Interface, INativeGuid
{
	public static ref readonly Guid IID_IDWriteFontFace2
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> 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<Guid>());
			return ref Unsafe.As<byte, Guid>(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;

	/// <inheritdoc cref="IUnknown.QueryInterface" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(0)]
	public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, Guid*, void**, int>)(lpVtbl[0]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), riid, ppvObject);
	}

	/// <inheritdoc cref="IUnknown.AddRef" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(1)]
	[return: NativeTypeName("ULONG")]
	public uint AddRef()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint>)(lpVtbl[1]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IUnknown.Release" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	[return: NativeTypeName("ULONG")]
	public uint Release()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint>)(lpVtbl[2]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteFontFace.GetType" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public new FontFaceType GetType()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, FontFaceType>)(lpVtbl[3]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteFontFace.GetFiles" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public HResult GetFiles(uint* numberOfFiles, IDWriteFontFile** fontFiles)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint*, IDWriteFontFile**, int>)(lpVtbl[4]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), numberOfFiles, fontFiles);
	}

	/// <inheritdoc cref="IDWriteFontFace.GetIndex" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public uint GetIndex()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint>)(lpVtbl[5]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteFontFace.GetSimulations" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(6)]
	public FontSimulations GetSimulations()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, FontSimulations>)(lpVtbl[6]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteFontFace.IsSymbolFont" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(7)]
	public Bool32 IsSymbolFont()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, Bool32>)(lpVtbl[7]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteFontFace.GetMetrics" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(8)]
	public void GetMetrics(FontMetrics* fontFaceMetrics)
	{
		((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, FontMetrics*, void>)(lpVtbl[8]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), fontFaceMetrics);
	}

	/// <inheritdoc cref="IDWriteFontFace.GetGlyphCount" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(9)]
	public ushort GetGlyphCount()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, ushort>)(lpVtbl[9]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteFontFace.GetDesignGlyphMetrics" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(10)]
	public HResult GetDesignGlyphMetrics(ushort* glyphIndices, uint glyphCount, GlyphMetrics* glyphMetrics, Bool32 isSideways)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, ushort*, uint, GlyphMetrics*, Bool32, int>)(lpVtbl[10]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), glyphIndices, glyphCount, glyphMetrics, isSideways);
	}

	/// <inheritdoc cref="IDWriteFontFace.GetGlyphIndices" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(11)]
	public HResult GetGlyphIndices(uint* codePoints, uint codePointCount, ushort* glyphIndices)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint*, uint, ushort*, int>)(lpVtbl[11]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), codePoints, codePointCount, glyphIndices);
	}

	/// <inheritdoc cref="IDWriteFontFace.TryGetFontTable" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(12)]
	public HResult TryGetFontTable(uint openTypeTableTag, void** tableData, uint* tableSize, void** tableContext, Bool32* exists)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint, void**, uint*, void**, Bool32*, int>)(lpVtbl[12]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), openTypeTableTag, tableData, tableSize, tableContext, exists);
	}

	/// <inheritdoc cref="IDWriteFontFace.ReleaseFontTable" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(13)]
	public void ReleaseFontTable(void* tableContext)
	{
		((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, void*, void>)(lpVtbl[13]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), tableContext);
	}

	/// <inheritdoc cref="IDWriteFontFace.GetGlyphRunOutline" />
	[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]<IDWriteFontFace2*, float, ushort*, float*, GlyphOffset*, uint, Bool32, Bool32, Graphics.Direct2D.Common.ID2D1SimplifiedGeometrySink*, int>)(lpVtbl[14]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, glyphIndices, glyphAdvances, glyphOffsets, glyphCount, isSideways, isRightToLeft, geometrySink);
	}

	/// <inheritdoc cref="IDWriteFontFace.GetRecommendedRenderingMode" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(15)]
	public HResult GetRecommendedRenderingMode(float emSize, float pixelsPerDip, MeasuringMode measuringMode, IDWriteRenderingParams* renderingParams, RenderingMode* renderingMode)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, float, float, MeasuringMode, IDWriteRenderingParams*, RenderingMode*, int>)(lpVtbl[15]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, measuringMode, renderingParams, renderingMode);
	}

	/// <inheritdoc cref="IDWriteFontFace.GetGdiCompatibleMetrics" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(16)]
	public HResult GetGdiCompatibleMetrics(float emSize, float pixelsPerDip, Matrix3x2* transform, FontMetrics* fontFaceMetrics)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, float, float, Matrix3x2*, FontMetrics*, int>)(lpVtbl[16]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, fontFaceMetrics);
	}

	/// <inheritdoc cref="IDWriteFontFace.GetGdiCompatibleGlyphMetrics" />
	[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]<IDWriteFontFace2*, float, float, Matrix3x2*, Bool32, ushort*, uint, GlyphMetrics*, Bool32, int>)(lpVtbl[17]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, useGdiNatural, glyphIndices, glyphCount, glyphMetrics, isSideways);
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetMetrics" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(18)]
	public void GetMetrics(FontMetrics1* fontMetrics)
	{
		((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, FontMetrics1*, void>)(lpVtbl[18]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), fontMetrics);
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetGdiCompatibleMetrics" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(19)]
	public HResult GetGdiCompatibleMetrics(float emSize, float pixelsPerDip, Matrix3x2* transform, FontMetrics1* fontMetrics)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, float, float, Matrix3x2*, FontMetrics1*, int>)(lpVtbl[19]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, fontMetrics);
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetCaretMetrics" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(20)]
	public void GetCaretMetrics(CaretMetrics* caretMetrics)
	{
		((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, CaretMetrics*, void>)(lpVtbl[20]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), caretMetrics);
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetUnicodeRanges" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(21)]
	public HResult GetUnicodeRanges(uint maxRangeCount, UnicodeRange* unicodeRanges, uint* actualRangeCount)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint, UnicodeRange*, uint*, int>)(lpVtbl[21]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), maxRangeCount, unicodeRanges, actualRangeCount);
	}

	/// <inheritdoc cref="IDWriteFontFace1.IsMonospacedFont" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(22)]
	public Bool32 IsMonospacedFont()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, Bool32>)(lpVtbl[22]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetDesignGlyphAdvances" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(23)]
	public HResult GetDesignGlyphAdvances(uint glyphCount, ushort* glyphIndices, int* glyphAdvances, Bool32 isSideways)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint, ushort*, int*, Bool32, int>)(lpVtbl[23]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), glyphCount, glyphIndices, glyphAdvances, isSideways);
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetGdiCompatibleGlyphAdvances" />
	[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]<IDWriteFontFace2*, float, float, Matrix3x2*, Bool32, Bool32, uint, ushort*, int*, int>)(lpVtbl[24]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), emSize, pixelsPerDip, transform, useGdiNatural, isSideways, glyphCount, glyphIndices, glyphAdvances);
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetKerningPairAdjustments" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(25)]
	public HResult GetKerningPairAdjustments(uint glyphCount, ushort* glyphIndices, int* glyphAdvanceAdjustments)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint, ushort*, int*, int>)(lpVtbl[25]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), glyphCount, glyphIndices, glyphAdvanceAdjustments);
	}

	/// <inheritdoc cref="IDWriteFontFace1.HasKerningPairs" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(26)]
	public Bool32 HasKerningPairs()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, Bool32>)(lpVtbl[26]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetRecommendedRenderingMode" />
	[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]<IDWriteFontFace2*, float, float, float, Matrix3x2*, Bool32, OutlineThreshold, MeasuringMode, RenderingMode*, int>)(lpVtbl[27]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), fontEmSize, dpiX, dpiY, transform, isSideways, outlineThreshold, measuringMode, renderingMode);
	}

	/// <inheritdoc cref="IDWriteFontFace1.GetVerticalGlyphVariants" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(28)]
	public HResult GetVerticalGlyphVariants(uint glyphCount, ushort* nominalGlyphIndices, ushort* verticalGlyphIndices)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint, ushort*, ushort*, int>)(lpVtbl[28]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), glyphCount, nominalGlyphIndices, verticalGlyphIndices);
	}

	/// <inheritdoc cref="IDWriteFontFace1.HasVerticalGlyphVariants" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(29)]
	public Bool32 HasVerticalGlyphVariants()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, Bool32>)(lpVtbl[29]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::IsColorFont"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(30)]
	public Bool32 IsColorFont()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, Bool32>)(lpVtbl[30]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::GetColorPaletteCount"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(31)]
	public uint GetColorPaletteCount()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint>)(lpVtbl[31]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::GetPaletteEntryCount"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(32)]
	public uint GetPaletteEntryCount()
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint>)(lpVtbl[32]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::GetPaletteEntries"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(33)]
	public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, Color4** paletteEntries)
	{
		return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint, uint, uint, Color4**, int>)(lpVtbl[33]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::GetRecommendedRenderingMode"]/*' />
	[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]<IDWriteFontFace2*, float, float, float, Matrix3x2*, Bool32, OutlineThreshold, MeasuringMode, IDWriteRenderingParams*, RenderingMode*, GridFitMode*, int>)(lpVtbl[34]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), fontEmSize, dpiX, dpiY, transform, isSideways, outlineThreshold, measuringMode, renderingParams, renderingMode, gridFitMode);
	}
	public interface Interface : IDWriteFontFace1.Interface
	{
		[VtblIndex(30)]
		Bool32 IsColorFont();

		[VtblIndex(31)]
		uint GetColorPaletteCount();

		[VtblIndex(32)]
		uint GetPaletteEntryCount();

		[VtblIndex(33)]
		HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, Color4** paletteEntries);

		[VtblIndex(34)]
		HResult GetRecommendedRenderingMode(float fontEmSize, float dpiX, float dpiY, Matrix3x2* transform, Bool32 isSideways, OutlineThreshold outlineThreshold, MeasuringMode measuringMode, IDWriteRenderingParams* renderingParams, RenderingMode* renderingMode, GridFitMode* gridFitMode);
	}
}

