dotnet / docs-desktop

This repository contains .NET documentation related to Windows Forms (winforms) and Windows Presentation Foundation (WPF).
Creative Commons Attribution 4.0 International
193 stars 174 forks source link

Code listing won't work #1018

Open tom-clik opened 3 years ago

tom-clik commented 3 years ago

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.

adegeo commented 3 years ago

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.