1

I am trying to migrate my MVC 6 project to .NET Core 2.0 and we all know that lots of things are missing or is still in the development phase.

I have a fonts folder containaing a number of .ttf files. My objective here is to retrieve all the Font Family Names from those ttf files.

Previously, I was using the PrivateFontCollection under the System.Drawing.Text namespace. The code was something like the answer to this post.

But it is not working in .NET Core.

Am I missing a dll reference or is there another way to do it in .NET Core.

Here is a sample of what i really want : enter image description here

Ozesh
  • 6,536
  • 1
  • 25
  • 23

2 Answers2

2

Great!!! It seems someone provided a mono implementation of System.Drawing. CoreCompat.System.Drawing

Ozesh
  • 6,536
  • 1
  • 25
  • 23
0

.Net Core >= 2.1 now supports System.Drawing.Common. This is a Microsoft supported library which includes PrivateFontCollection.

Brian
  • 37,399
  • 24
  • 94
  • 109