Changing font universally - richfaces
i was wondering is there a way to change font universally fo开发者_如何学运维r richfaces irrespective of what skin i am using.
You should consider using a master css file for your project.
Just look at every rendered richfaces component. I believe that everyone has a common css class.
And, specify the font of this css class, in a master css file, for example:
.common-class-that-youve-looked {
font-family: Ubuntu, sans-serif;
}
There is a section in the RichFaces developers guide documentation for RF4.x (Chapter 6. Skinning and theming). Section Skin parameter tables states to use the parameter called generalSizeFont
.
You install this via putting aNameOfYourChoice.skin.properties
in you webapp's
\WEB-INF\classes\META-INF\skins
directory. Then add to your web.xml
:
<context-param>
<param-name>org.richfaces.skin</param-name>
<param-value>aNameOfYourChoice</param-value>
</context-param>
My aNameOfYourChoice.skin.properties
looks like this:
baseSkin=ruby
generalSizeFont=12px #your size of fonts
精彩评论