How to get ALL available font styles using ImageSharp?

60 Views Asked by At

I would like to be able to access all the styles of a font using ImageSharp.

Let's say for example I want to use the font "Bahnschrift" which comes preinstalled with Windows, with the specific style "SemiCondensed". Right now getting the family I am not able to see all the available styles as doing :

family.GetAvailableStyles()

will just return a collection of enumerators with the fonts in the defined styles. As a consequence I am not able to load that specific style.

I checked The documentation, but have not been successful in finding any way to specify a custom named font style.

I am welcome to any suggestion, thanks!

1

There are 1 best solutions below

0
SulfurChunk On BEST ANSWER

For anyone wondering, as of today the 29th of February 2024, the library does NOT support variable fonts as addressed in this discussion post on their official Github repository.