Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7642317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:09:31+00:00 2026-05-31T09:09:31+00:00

i want to use external font WebSymbols and i placed it my stylesheet.css declaration

  • 0

i want to use external font WebSymbols

and i placed it my stylesheet.css declaration

@font-face{ 
font-family: 'WebSymbolsRegular';
src: url('websymbols-regular-webfont.eot');
src: url('websymbols-regular-webfont.eot?#iefix') format('embedded-opentype'),
     url('websymbols-regular-webfont.woff') format('woff'),
     url('websymbols-regular-webfont.ttf') format('truetype'),
     url('websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg');
}

.fakeImage {
font-family: 'WebSymbolsRegular';
font-size: 12px;
text-decoration: none;
 }

My stylesheet.css located in META-INF/resources/css/stylesheet.css file. I put font files (eot, svg, etc.) in the same directory – META-INF/resources/css. In header of my jsf page i put reference to this stylesheet:

<h:outputStylesheet library="css" name="stylesheet.css" />

But instead of special symbols from font i got regular text. All other css styles are worked normally. Any idea how to use custom font?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:09:33+00:00Added an answer on May 31, 2026 at 9:09 am

    My stylesheet.css located in META-INF/resources/css/stylesheet.css file

    META-INF? So this is bundled in a JAR file which is in turn dropped in webapp’s /WEB-INF/lib?

    Regardless, you need to use the #{resource} resolver instead to resolve classpath resources to proper /javax.faces.resource URLs .

    src: url("#{resource['css:websymbols-regular-webfont.eot']}");
    src: url("#{resource['css:websymbols-regular-webfont.eot']}?#iefix") format('embedded-opentype'),
         url("#{resource['css:websymbols-regular-webfont.woff']}") format('woff'),
         url("#{resource['css:websymbols-regular-webfont.ttf']}") format('truetype'),
         url("#{resource['css:websymbols-regular-webfont.svg']}#WebSymbolsRegular") format('svg');
    

    Further, I recommend to put one additional path in /resources folder which can then represent the real library name. The library="css" is namely the wrong usage of the resource library. It should not represent specific resource types (CSS/JS/images) at all, but a real common library name. For example, /common. You can then reference the stylesheet and the resources as follows:

    <h:outputStylesheet library="common" name="css/stylesheet.css" />
    

    and

    src: url("#{resource['common:css/websymbols-regular-webfont.eot']}");
    src: url("#{resource['common:css/websymbols-regular-webfont.eot']}?#iefix") format('embedded-opentype'),
         url("#{resource['common:css/websymbols-regular-webfont.woff']}") format('woff'),
         url("#{resource['common:css/websymbols-regular-webfont.ttf']}") format('truetype'),
         url("#{resource['common:css/websymbols-regular-webfont.svg']}#WebSymbolsRegular") format('svg');
    

    See also:

    • What is the JSF resource library for and how should it be used?
    • How to reference CSS / JS / image resource in Facelets template?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning HTML and want to use an external CSS for my site.
I want to use an external browser window to implement a preview functionality in
I want to use an external website http://www.siirretytnumerot.fi/ in my android application. This website
I want to use curl to retrieve a table from an external page. So
I want to use two external jars from EJB: jar #1 - all interfaces
I want to use external fonts in my app. I have tried adding new
How can I use the external JavaScript in Facebook application development? Actually I want
I'm building a Flash 4 Builder project and want to use an external actionscript
Designers want to add external CSS files, but they only may work on modules/templates,
I want to make a standard install for external use, but I also want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.