SixLabors / Fonts

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

Make TableLoader works without reflection #278

Closed kant2002 closed 2 years ago

kant2002 commented 2 years ago

I did try to port https://github.com/JamesRandall/fsharp-wolfenstein to NativeAOT in reflection-free mode, to see how far I can go, and this is only piece which prevents me to use NativeAOT without reflection in this library.

I notice comment in the Register abotu static interface methods, but seems to be manual registration can be used fine, and seems to be less magic.

codecov[bot] commented 2 years ago

Codecov Report

Merging #278 (21d089b) into main (feb975a) will decrease coverage by 0%. The diff coverage is 100%.

@@          Coverage Diff          @@
##            main    #278   +/-   ##
=====================================
- Coverage     82%     82%   -1%     
=====================================
  Files        216     215    -1     
  Lines      11260   11250   -10     
  Branches    1750    1749    -1     
=====================================
- Hits        9238    9228   -10     
  Misses      1599    1599           
  Partials     423     423           
Flag Coverage Δ
unittests 82% <100%> (-1%) :arrow_down:

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

Impacted Files Coverage Δ
...bors.Fonts/Tables/AdvancedTypographic/GPosTable.cs 87% <ø> (ø)
...bors.Fonts/Tables/AdvancedTypographic/GSubTable.cs 92% <ø> (ø)
...Tables/AdvancedTypographic/GlyphDefinitionTable.cs 80% <ø> (ø)
src/SixLabors.Fonts/Tables/Cff/Cff1Table.cs 76% <ø> (ø)
src/SixLabors.Fonts/Tables/Cff/Cff2Table.cs 0% <ø> (ø)
src/SixLabors.Fonts/Tables/General/CMapTable.cs 88% <ø> (ø)
...c/SixLabors.Fonts/Tables/General/Colr/ColrTable.cs 100% <ø> (ø)
src/SixLabors.Fonts/Tables/General/CpalTable.cs 86% <ø> (ø)
src/SixLabors.Fonts/Tables/General/HeadTable.cs 94% <ø> (ø)
...Labors.Fonts/Tables/General/HorizontalHeadTable.cs 97% <ø> (ø)
... and 14 more

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 feb975a...21d089b. Read the comment docs.

JimBobSquarePants commented 2 years ago

No plans, attribute can go. This is a great improvement 👍