<PackageReference Include="System.Drawing.Common" Version="9.0.9" />

InstalledFontCollection

public sealed class InstalledFontCollection : FontCollection
Represents the fonts installed on the system. This class cannot be inherited.
using Windows.Win32; using Windows.Win32.Graphics.GdiPlus; namespace System.Drawing.Text { public sealed class InstalledFontCollection : FontCollection { public unsafe InstalledFontCollection() { GpFontCollection* nativeFontCollection = default(GpFontCollection*); PInvoke.GdipNewInstalledFontCollection(&nativeFontCollection).ThrowIfFailed(); _nativeFontCollection = nativeFontCollection; } } }