SixLabors / Fonts

:black_nib: Font loading and layout library.
https://sixlabors.com/products/fonts
Other
306 stars 71 forks source link

SystemFontCollection doesn't list open type font. #316

Closed nakamura2000 closed 1 year ago

nakamura2000 commented 1 year ago

Prerequisites

Description

SystemFontCollection doesn't list open type font. It seems System.FontCollection searches ".ttc" and ".ttf" but it doesn't search "otf".

Steps to Reproduce

  1. install otf font in os system font directory. (e.x Fonts/tests/SixLabors.Fonts.Tests/Fonts/NotoSansKR-Regular.otf)
  2. list font by this code.
  [Fact]
  public void SystemFonts_HasOTF()
  {
      IEnumerable<FontFamily> matched = SystemFonts.Collection.Families.Where(x => x.Name == "Noto Sans KR");
      Assert.True(matched.Count() != 0);
  }

System Configuration