Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Roboto font as dependency instead of using Google-hosted fonts #59

Open
romankaravia opened this issue Jul 15, 2024 · 1 comment
Open

Comments

@romankaravia
Copy link

This is a proposal to install the Roboto font as a dependency of create-vuetify instead of using Google-hosted fonts.

Current situation

Proposed improvement

A way to fix all of the above issues could be to use unplugin-fonts (existing dependency), add @fontsource/roboto, remove roboto-fontface, and adapt the unplugin-fonts config to use the locally installed Roboto font and also add italic style. See also detailed description in this issue comment.

I'd be happy to have a go at implementing this, but would first like to get some feedback about whether such a change would be welcomed by the maintainer(s) or not.

@segevfiner
Copy link

Basically configuring:

import ViteFonts from "unplugin-fonts/vite";

export default defineConfig({
  plugins: [
    ViteFonts({
      fontsource: {
        families: [
          {
            name: "Roboto",
            weights: [100, 300, 400, 500, 700, 900],
            styles: ["normal", "italic"],
          },
        ],
      },
    }),
  ],
});

Which I personally prefer and change my projects to use that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants