jsf 2 - JSF Custom font with CSS -


i trying add custom font _template.html, not rendering font, plain text. tried solution found here, did not solve problem.

my custom font file in webcontent/resources/fonts/helveticaneueltstd-ltex.otf

my css file in webcontent/resources/css/font.css

font.css:

@font-face { font-family: "martinelli logo";  src: url("#{resource['fonts/helveticaneueltstd-ltex.otf']}"); font-weight: normal; font-style: normal;  body{ font-family: "martinelli logo"; } } 

obs.: tried src: url('fonts/helveticaneueltstd-ltex.otf');, no luck.

_template.xtml:

<h:body> <h:outputstylesheet library="css" name="css/font.css" /> hello world in custom font! <h:body /> 

the final solution: apparently browser (chrome) loading old cached css, wasn't being able see updates developing on styles. cleaned chrome's cache , working perfectly. need figure how change behavior on browser, since don't want clean every change on css.

biggest facepalm ever.

edit:

found solution opening devtools -> settings -> checked disable cache (while devtool open)

now can edit css , refresh page see results. thanks.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -