Git Product home page Git Product logo

Comments (6)

danielroe avatar danielroe commented on August 20, 2024 1

Apologies for this. With tailwind you will probably need to do this:

export default {
  theme: {
    fontFamily: {
      sans: ['Poppins', 'Poppins override', 'sans-serif']
    }
  }
}

Let me know if that resolves things for you. 🙏

from fontaine.

PatrikBird avatar PatrikBird commented on August 20, 2024

Still trying:

I removed the fontMetrics config object from my nuxt.config.ts and found some Poppins override after building within my bundle (at server/chunks/app/server.mjs and public/_nuxt/entry.ec2f5241.css, e.g.:

931:  useHead({ style: [{ 
children: css + ` @font-face { font-family: "Poppins override"; src: local("BlinkMacSystemFont"),
local("Segoe UI"),local("Roboto"),local("Helvetica Neue"),local("Arial"),local("Noto Sans"); 
ascent-override: 105%; descent-override: 35%; line-gap-override: 10%; }
[...]

still not sure if correct and if I set it up correctly as my CLS is unchanged.

from fontaine.

danielroe avatar danielroe commented on August 20, 2024

Did you resolve this?

from fontaine.

Smef avatar Smef commented on August 20, 2024

Whoops! Fixing my post:

It looks like fallback is what is being generated in the CSS for the font-face options. The sizing doesn't seem to match up, but module is not using override.

The sizes don't seem to be calculating correctly, though, so while it is loading a fallback font, it's still shifting a whole bunch. In fact, it's even a bit worse than the default sans-serif, so I've disabled this.

I did see other posts about nuxt-fonts, so I'm going to check that out.

from fontaine.

danielroe avatar danielroe commented on August 20, 2024

Updated and released module with latest version of fontaine, which should resolve issue with the metrics being slightly off.

from fontaine.

Smef avatar Smef commented on August 20, 2024

It stilld oesn't seem to have helped, unfortunately. I can confirm that fontaine 0.5.0 is installed, but the metrics are causing more CLS than the default. Here are some screenshots comparing the intended Jakarta font, the fontaine Fallback font, and the system UI font.

font-jakarta
font-fallback
font-ui-sans-serif

from fontaine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.