Just downloaded a new project from App Start. In App Start, the font looks correct (Work Sans). Running the app locally, it is incorrect (Times). I’ll look through the documentation and figure out how to fix it. Just wondering if this is a bug or user error?
@SpringBootApplication
@NpmPackage(value = "@fontsource/work-sans", version = "4.5.0")
@Theme(value = "av-equipment-suppliers")
public class Application implements AppShellConfigurator {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
@import url('./views/home-view.css');
@import url('@fontsource/work-sans/index.css'); html {
--lumo-font-family: Work Sans;
}
Looking at the docs, it seems css from npm packages should be imported using the importCss key. assets should be used to import resources like icons and fonts
Unfortunately, I’ve never gotten changes in font to work. I tried modifying the fonts in the App Starter a few times. It never worked so stopped. This is the first time I’ve tried again in a few months.
hmm, ok, thanks. Must be something with my local setup. I can’t really mark a solution here, but is there some way to mark this post as closed or similar?