0

Change default font in zk.xml doesn't work.

asked 2009-11-17 06:06:03 +0800

prometeo gravatar image prometeo flag of Italy
43 1 4

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

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-11-18 03:16:05 +0800

prometeo gravatar image prometeo flag of Italy
43 1 4

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

link publish delete flag offensive edit

answered 2009-11-18 03:24:27 +0800

PeterKuo gravatar image PeterKuo
481 2

Welcome to ZK.
The wiki page is fixed.
Thank for your notice.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-11-17 06:06:03 +0800

Seen: 760 times

Last updated: Nov 18 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More