-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
[Documentation] Missing docs for installing the Roboto font for adding Vuetify to an existing project #19140
Comments
I personally used import '@fontsource/roboto/400.css';
import '@fontsource/roboto/700.css';
import '@fontsource/roboto/400-italic.css';
import '@fontsource/roboto/700-italic.css'; |
Also just stumbled over this, here's what I came up with... Installation via @fontsource/roboto + unplugin-fontsThis installs the Roboto font locally, including all required weights and styles, and bundles it through vite. Run
Add the following to your vite config 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"],
},
],
},
}),
],
}); Add the following to your import "unfonts.css"; Installation via unplugin-fonts + Google-hosted fonts (not recommended)This is what create-vuetify is currently doing. Run
Add the following to your vite config (see create-vuetify template) import ViteFonts from "unplugin-fonts/vite";
export default defineConfig({
plugins: [
ViteFonts({
google: {
families: [{
name: 'Roboto',
styles: 'wght@100;300;400;500;700;900',
}],
},
}),
],
}); Issues with this approach
See also |
Environment
Browsers: Chrome 121.0.0.0
OS: Mac OS 10.15.7
Steps to reproduce
There are no instructions in the given section about the need to install the Roboto font used by Vuetify into the project.
Expected Behavior
Give instructions on how to do so.
Actual Behavior
There is none, likely leading to it being forgotten at all.
Reproduction Link
https://vuetifyjs.com/en/getting-started/installation/#existing-projects
The text was updated successfully, but these errors were encountered: