ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.06k stars 236 forks source link

PdfSharpCore.Utils.FontResolver code cleanup, refactor #268

Open MichelMichels opened 2 years ago

MichelMichels commented 2 years ago

As I was working on the previous support for the local AppData fonts in Windows, I noticed that the code was a bit 'old'. Things I changed:

There were no tests, so I couldn't check if this breaks something. I did do a quick check with the font families from the issue in PR #267 and this worked like expected.

codecov-commenter commented 2 years ago

Codecov Report

Merging #268 (91c7cd5) into master (2828a90) will increase coverage by 0.00%. The diff coverage is 56.80%.

@@           Coverage Diff           @@
##           master     #268   +/-   ##
=======================================
  Coverage   26.62%   26.63%           
=======================================
  Files         238      239    +1     
  Lines       23336    23360   +24     
  Branches     2809     2811    +2     
=======================================
+ Hits         6214     6221    +7     
- Misses      16629    16643   +14     
- Partials      493      496    +3     
Impacted Files Coverage Δ
PdfSharpCore/Internal/FontFamilyModel.cs 40.00% <ø> (ø)
PdfSharpCore/Utils/FontResolver.cs 46.93% <49.53%> (-9.80%) :arrow_down:
PdfSharpCore/Utils/FontFileInfo.cs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2828a90...91c7cd5. Read the comment docs.