Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
==========================================
+ Coverage 98.95% 99.02% +0.07%
==========================================
Files 11 11
Lines 480 515 +35
Branches 119 132 +13
==========================================
+ Hits 475 510 +35
Misses 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| subsets: ['latin'], | ||
| weights: ['400'], | ||
| }) | ||
| expect(fonts.length).toBe(1) |
There was a problem hiding this comment.
do we have an example of a provider returning several different formats we could test?
There was a problem hiding this comment.
We have the case with the google provider I think, see https://github.com/unjs/unifont/pull/297/files#diff-cbf7cd7589545d91f982b1cd036d597e97e37f683390ea213dc545d82081f003R270
| const styles = [ | ||
| 'oblique 0deg 15deg', | ||
| 'normal', | ||
| ] as ResolveFontOptions['styles'] |
There was a problem hiding this comment.
is there a reason we're not testing the different styles/weights?
There was a problem hiding this comment.
IIRC that's because since it's now woff2 only, there's no woff fallback with more classic values. Since this test is about testing variable axis, not the fallbakcs, I thought it'd be fine to remove. I can restore it and specify formats: ['woff2', 'woff'] if you want! No strong opinion
danielroe
left a comment
There was a problem hiding this comment.
this is phenomenal! great work.
just a few quick questions.
formats: FontFormat[]toResolveFontOptions(defaults to just woff2)cleanFontFaces()utilityformat(eg. ttf to truetype)