docs-desktop
docs-desktop copied to clipboard
Code listing won't work
This code listing wont' work. There is actually no reference to the Private font collection after you've added the font and you'll just get a generic font.
Not only does the listing not work but it's not obvious how to use a Private font collection after you have added it.
As far as I can tell you have to loop over the families and match the name.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 06fc1510-cd63-95c6-f191-97cecaedd906
- Version Independent ID: d5c0beca-4d9c-5e2b-6869-6c50e4191402
- Content: How to: Create a Private Font Collection - Windows Forms .NET Framework
- Content Source: dotnet-desktop-guide/framework/winforms/advanced/how-to-create-a-private-font-collection.md
- Product: dotnet-framework
- Technology: dotnet-winforms
- GitHub Login: @adegeo
- Microsoft Alias: adegeo
Hello. Thank you for pointing this out. It's definitely not a great way to showcase private collections with fonts not installed by the system. It should be using new Font(fontFamilies[j], 16, FontStyle.Bold, GraphicsUnit.Pixel); to create each font.