Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal static Text.TextInterface.Factory Instance
}
}

internal static Text.TextInterface.FontCollection SystemFontCollection
internal static unsafe Text.TextInterface.FontCollection SystemFontCollection
{
get
{
Expand All @@ -50,7 +50,13 @@ internal static Text.TextInterface.FontCollection SystemFontCollection
{
if (_systemFontCollection == null)
{
_systemFontCollection = DWriteFactory.Instance.GetSystemFontCollection();
var dwriteFactory = Instance.DWriteFactoryAddRef;
IDWriteFontCollection* dwriteFontCollection = null;
var checkForUpdates = false;
var hr = dwriteFactory->GetSystemFontCollection(&dwriteFontCollection, checkForUpdates);
System.GC.KeepAlive(this);
_systemFontCollection = new MS.Internal.Text.TextInterface.FontCollection(dwriteFontCollection);
dwriteFactory->Release();
}
}
}
Expand Down