Skip to content

Fix #316 include open type font(otf) in system font collection. - #317

Merged
JimBobSquarePants merged 1 commit into
SixLabors:mainfrom
nakamura2000:fix-316
Jan 9, 2023
Merged

Fix #316 include open type font(otf) in system font collection.#317
JimBobSquarePants merged 1 commit into
SixLabors:mainfrom
nakamura2000:fix-316

Conversation

@nakamura2000

@nakamura2000 nakamura2000 commented Jan 8, 2023

Copy link
Copy Markdown
Contributor

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fix #316
Add otf extension to system font collection allowed extension.
This test needs installing font to system font directory so I couldn't provide test case in unit test.

  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);
     }
    

@CLAassistant

CLAassistant commented Jan 8, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Jan 9, 2023

Copy link
Copy Markdown

Codecov Report

Merging #317 (17cf049) into main (b97f40e) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff          @@
##            main    #317   +/-   ##
=====================================
  Coverage     83%     83%           
=====================================
  Files        224     224           
  Lines      12299   12300    +1     
  Branches    1788    1788           
=====================================
+ Hits       10279   10280    +1     
  Misses      1600    1600           
  Partials     420     420           
Flag Coverage Δ
unittests 83% <100%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/SixLabors.Fonts/SystemFontCollection.cs 53% <100%> (+<1%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@JimBobSquarePants
JimBobSquarePants merged commit 570875b into SixLabors:main Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SystemFontCollection doesn't list open type font.

3 participants