Skip to content

Commit

Permalink
chore: use real font files for font tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsakenHarmony committed Jan 30, 2024
1 parent 9c35f21 commit d38bd5c
Show file tree
Hide file tree
Showing 54 changed files with 93 additions and 69 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import localFont from '@next/font/local'

const componentFont = localFont({ src: './comp.woff2', preload: false })
const componentFont = localFont({
src: './comp-font-merriweather.woff2',
preload: false,
})

export default function Component() {
return (
Expand Down

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import localFont from '@next/font/local'

const layoutFont = localFont({ src: './layout.woff2', preload: false })
const layoutFont = localFont({
src: './layout-font-rubik.woff2',
preload: false,
})

export default function Layout({ children }) {
return (
Expand Down

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
'use client'
import localFont from '@next/font/local'

const pageFont = localFont({ src: './page.woff2', preload: false })
const pageFont = localFont({
src: './page-font-ubuntu-regular.woff2',
preload: false,
})

export default function Page() {
return (
Expand Down

This file was deleted.

Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import localFont from '@next/font/local'

const layoutFont = localFont({ src: './layout-font.woff2' })
const layoutFont = localFont({ src: './layout-font-nunito-sans.woff2' })

export default function Layout({ children }) {
return (
Expand Down
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import localFont from '@next/font/local'

const pageFont = localFont({ src: './page-font.woff2' })
const pageFont = localFont({ src: './page-font-raleway-thin.woff2' })

export default function HomePage() {
return (
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion test/e2e/app-dir/next-font/app-old/navigation/font.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import localFont from '@next/font/local'

export const font = localFont({ src: './font.woff2' })
export const font = localFont({ src: './font-noto-sans.woff2' })
1 change: 0 additions & 1 deletion test/e2e/app-dir/next-font/app-old/navigation/font.woff2

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import localFont from 'next/font/local'

const componentFont = localFont({ src: './comp.woff2', preload: false })
const componentFont = localFont({
src: './comp-font-merriweather.woff2',
preload: false,
})

export default function Component() {
return (
Expand Down

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import localFont from 'next/font/local'

const layoutFont = localFont({ src: './layout.woff2', preload: false })
const layoutFont = localFont({
src: './layout-font-rubik.woff2',
preload: false,
})

export default function Layout({ children }) {
return (
Expand Down

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
'use client'
import localFont from 'next/font/local'

const pageFont = localFont({ src: './page.woff2', preload: false })
const pageFont = localFont({
src: './page-font-ubuntu-regular.woff2',
preload: false,
})

export default function Page() {
return (
Expand Down

This file was deleted.

Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import localFont from 'next/font/local'

const layoutFont = localFont({ src: './layout-font.woff2' })
const layoutFont = localFont({ src: './layout-font-nunito-sans.woff2' })

export default function Layout({ children }) {
return (
Expand Down
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import localFont from 'next/font/local'

const pageFont = localFont({ src: './page-font.woff2' })
const pageFont = localFont({ src: './page-font-raleway-thin.woff2' })

export default function HomePage() {
return (
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion test/e2e/app-dir/next-font/app/navigation/font.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import localFont from 'next/font/local'

export const font = localFont({ src: './font.woff2' })
export const font = localFont({ src: './font-noto-sans.woff2' })
1 change: 0 additions & 1 deletion test/e2e/app-dir/next-font/app/navigation/font.woff2

This file was deleted.

1 change: 0 additions & 1 deletion test/e2e/app-dir/next-font/fonts/font1.woff2

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion test/e2e/app-dir/next-font/fonts/font2.woff2

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion test/e2e/app-dir/next-font/fonts/font3.woff2

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion test/e2e/app-dir/next-font/fonts/font4.woff2

This file was deleted.

Binary file not shown.
21 changes: 15 additions & 6 deletions test/e2e/app-dir/next-font/fonts/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
import localFont from 'next/font/local'

export const font1 = localFont({ src: './font1.woff2', variable: '--font-1' })
export const font2 = localFont({ src: 'font2.woff2', variable: '--font-2' })
export const font1 = localFont({
src: './font1_roboto.woff2',
variable: '--font-1',
})
export const font2 = localFont({
src: 'font2_roboto-mono-regular.woff2',
variable: '--font-2',
})
export const font3 = localFont({
src: './font3.woff2',
src: './font3_inter-regular.woff2',
weight: '900',
style: 'italic',
})
export const font4 = localFont({ src: './font4.woff2', weight: '100' })
export const font4 = localFont({
src: './font4_workbench-regular.woff2',
weight: '100',
})
export const font5 = localFont({
src: './test/font5.woff2',
src: './test/font5_open-sans-regular.woff2',
style: 'italic',
preload: false,
})
export const font6 = localFont({ src: 'test/font6.woff2' })
export const font6 = localFont({ src: 'test/font6_single-day-regular.woff2' })
1 change: 0 additions & 1 deletion test/e2e/app-dir/next-font/fonts/test/font5.woff2

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion test/e2e/app-dir/next-font/fonts/test/font6.woff2

This file was deleted.

Binary file not shown.
Loading

0 comments on commit d38bd5c

Please sign in to comment.