Skip to content
Advertisement

Unable to include font folder in java application

I am facing a weird problem and I am stuck at the moment. I have a java application running in tomcat on my local machine. Recent requirement was to include a new font for the app. I downloaded the font and put in under a folder lookandfeel where my style.css is.

Current Folder structure

enter image description here

in my style.css I am importing the font using the following code

@import url("/font/stylesheet.css");
html {font-family: "Clarimo UD PE", Helvetica, Sans-Serif;}

But when I run my code it still uses ‘Helvetica’ and my folder structure is this

enter image description here

Somehow it is not deploying the font folder. Am I missing something ?

Advertisement

Answer

I can’t see your whole file tree but by the looks of things the directory called “lookandfeel” is inside the root directory.

Your import URL is looking for a directory called font which is a child of the root directory. I think you meant to use “font/stylesheet.css” or “/lookandfeel/font/stylesheet.css”

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement