Custom font and font size

A discussion forum for the Eastwood Chart Servlet.

Custom font and font size

Postby ntherning » Mon Jun 30, 2008 10:06 am

Hi,

I have patched Eastwood to be able to specify my own font. I've done this using servlet init-params. The user can either specify a TTF file containing the font or give the name of a font to be used instead of the default Dialog font. The default font size is also configurable using an init-param.

I'd like to add this to Eastwood. What do you think?
ntherning
 
Posts: 5
Joined: Fri Jun 27, 2008 10:30 am

Postby david.gilbert » Tue Jul 01, 2008 8:00 am

Yes, this sounds good to me.

Regards,

Dave
david.gilbert
JFreeChart Project Leader
 
Posts: 11653
Joined: Fri Mar 14, 2003 10:29 am

Postby ntherning » Wed Jul 02, 2008 9:02 am

The patch has been committed. Here's an example of how to use it:

Code: Select all
  <servlet>
    <servlet-name>chart</servlet-name>
    <servlet-class>org.jfree.eastwood.ChartServlet</servlet-class>
    <init-param>
      <param-name>fontResource</param-name>
      <param-value>/WEB-INF/verdana.ttf</param-value>
    </init-param>
    <init-param>
      <param-name>fontSize</param-name>
      <param-value>10</param-value>
    </init-param>
  </servlet>


See the Javadoc for ChartServlet for more info on the available init-params.

Changes:
http://eastwood.svn.sourceforge.net/vie ... evision=25
ntherning
 
Posts: 5
Joined: Fri Jun 27, 2008 10:30 am


Return to Eastwood Chart Servlet

Who is online

Users browsing this forum: No registered users and 1 guest