-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello
I am trying to change the default fonts in zk.xml for whole web application.
As stated in http://www.zkoss.org/doc/devguide/ch14s06s01.html, I set the org.zkoss.zul.theme.fontSizeT and org.zkoss.zul.theme.fontSizeC properties.
Our need is for setting the "Century Gothic" font, which doesn't work in Firefox and Chrome, but it doens't work for other fonts too (Comic, for example)
This is my zk.xml
<?xml version="1.0" encoding="UTF-8"?>
<zk>
<library-property>
<name>org.zkoss.zul.theme.fontSizeT</name>
<value>'century gothic'</value>
</library-property>
<library-property>
<name>org.zkoss.zul.theme.fontSizeC</name>
<value>'century gothic'</value>
</library-property>
<library-property>
<name>org.zkoss.zul.theme.fontSizeM</name>
<value>12px</value>
</library-property>
<library-property>
<name>org.zkoss.zul.theme.fontSizeS</name>
<value>10px</value>
</library-property>
<library-property>
<name>org.zkoss.zul.theme.fontSizeXS</name>
<value>10px</value>
</library-property>
<device-config>
<device-type>ajax</device-type>
<timeout-uri>/index.zul</timeout-uri> <!-- An empty URL can cause the browser to reload the same URL -->
</device-config>
</zk>
It doesn't work if I use
Century Gothic
'Century Gothic'
'century gothic'
I am using ZK 3.6.3 while waiting for 5.0 official release.
How can I manage this font change?
Thank you
Best regards
Gianluca Bonetti
Well...
It is wrong documented.
Please fix documentation pages:
http://www.zkoss.org/doc/devguide/ch14s06s01.html
http://docs.zkoss.org/wiki/Theme#Change_Font_Size_and_Family
Should use org.zkoss.zul.theme.fontFamilyT (instead of org.zkoss.zul.theme.fontSizeT) and org.zkoss.zul.theme.fontFamilyC (instead of org.zkoss.zul.theme.fontSizeC).
This...
<library-property>
<name>org.zkoss.zul.theme.fontFamilyT</name>
<value>Century Gothic</value>
</library-property>
<library-property>
<name>org.zkoss.zul.theme.fontFamilyC</name>
<value>Century Gothic</value>
</library-property>
...works.
Thanks
Best regards
Gianluca Bonetti
Asked: 2009-11-17 06:06:03 +0800
Seen: 760 times
Last updated: Nov 18 '09