Lato font has a bad rendering in NextJS
- Dominant language
- HTML
- Stars
- 20.5k
- Forks
- 2.9k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 95
Description
I use the _Lato_ font with a font weight 400, on the framework NextJS, with the [font component](https://nextjs.org/docs/pages/api-reference/components/font), and I see a bad rendering of some characters.
Thanks a lot for your help :)
**Describe the bug**
On display, with the specified font-weight, the font isn't rendered correctly. I have tested with Roboto a font like Lato, and I don't have the same problem.
**To Reproduce**
On the _NextJS_ framework, use the _Lato_ font like this, font example in a `src/common/styled/app/base/fontFace.ts` file. By the way, I use _Styled Components_:
```
import { Lato } from 'next/font/google'
import { css } from 'styled-components'
const lato = Lato({
weight: ['400', '700', '900'],
subsets: ['latin'],
variable: '--font-lato',
})
const fontsFace = () => css`
:root {
--font-lato: ${lato.style.fontFamily};
}
`
export default fontsFace
```
After, I use the CSS variable like this:
```
body {
font-family: var(--font-lato);
font-weight: 400;
}
```
**Expected behavior**
Like another fonts, I expect to have a good rendering, and not the bad rendering that you can see on the first 2 screenshots below.
**Screenshots**


Test with the _Roboto_ font with `font-weight: 400`:


**Additional context**
Windows 10, Chrome 129.0.6668.101, Firefox 128.3.1esr (64 bits)
Contributor guide
Assessment
This issue has not been assessed yet.