Skip to content

Commit

Permalink
fixup! Merge branch 'canary' into wbinnssmith/unify-fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
wbinnssmith committed Jun 8, 2023
1 parent 52e790d commit 6f00e41
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,18 @@ mod tests {
"unitsPerEm": 2816,
"xHeight": 1536,
"xWidthAvg": 1335
}
},
"arial": {
"familyName": "Arial",
"category": "sans-serif",
"capHeight": 1467,
"ascent": 1854,
"descent": -434,
"lineGap": 67,
"unitsPerEm": 2048,
"xHeight": 1062,
"xWidthAvg": 904
}
}
"#,
)?;
Expand All @@ -200,10 +211,10 @@ mod tests {
Fallback {
font_family: "Arial".to_owned(),
adjustment: Some(FontAdjustment {
ascent: 0.9324334770490376,
descent: -0.23242476700635833,
ascent: 0.901_989_700_374_532,
descent: -0.224_836_142_322_097_4,
line_gap: 0.0,
size_adjust: 1.0389481114147647
size_adjust: 1.074_014_481_094_127
})
}
);
Expand All @@ -225,7 +236,18 @@ mod tests {
"unitsPerEm": 2048,
"xHeight": 1082,
"xWidthAvg": 969
}
},
"timesNewRoman": {
"familyName": "Times New Roman",
"category": "serif",
"capHeight": 1356,
"ascent": 1825,
"descent": -443,
"lineGap": 87,
"unitsPerEm": 2048,
"xHeight": 916,
"xWidthAvg": 819
}
}
"#,
)?;
Expand All @@ -235,10 +257,10 @@ mod tests {
Fallback {
font_family: "Times New Roman".to_owned(),
adjustment: Some(FontAdjustment {
ascent: 0.9239210539440684,
descent: -0.23894510015794873,
ascent: 0.885_645_438_273_993_8,
descent: -0.229_046_234_036_377_7,
line_gap: 0.0,
size_adjust: 1.134135387462914
size_adjust: 1.183_150_183_150_183_2
})
}
);
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/next-font/google-fetch-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('next/font/google fetch error', () => {
afterAll(() => next.destroy())

if (isDev) {
it('should use a fallback font in dev', async () => {
it.only('should use a fallback font in dev', async () => {
await next.start()
const outputIndex = next.cliOutput.length
const browser = await webdriver(next.url, '/')
Expand All @@ -55,6 +55,7 @@ describe('next/font/google fetch error', () => {
)
expect(sizeAdjust).toBe('107.4%')

console.log('cli output', next.cliOutput)
expect(next.cliOutput.slice(outputIndex)).toInclude(
'Failed to download `Inter` from Google Fonts. Using fallback font instead.'
)
Expand Down

0 comments on commit 6f00e41

Please sign in to comment.