Locale and Fonts - Windows


The reports and documents in the release package make use of the system's locale to get the appropriate date and currency formats and to select the appropriate resource bundle

Note that the locale used by OpenVPMS is that seen by the Java environment used by Tomcat and that this can be different from that you see when you log on as a Windows user. The locale being used is displayed on the Help screen. For how to set/check the Java locale see here.

If you run Tomcat under a user account, then you need to check the locale set for that account.

However, if you run Tomcat under the system account (the normal setup) then you need to ensure that the locale set for the 'Welcome Screen and System accounts' is as required. If not, on the Copy Settings window, click the 'Welcome screen and system account' box and press OK. Note also that it is the 'Format:' setting that determines the date and currency formats.

If you change the region settings, then you MUST restart Tomcat for the change to take affect.

Document Fonts

OpenVPMS can generate documents using OpenOffice or Microsoft Word, or JasperReports templates. These have different requirements when it comes to fonts.

OpenOffice and Microsoft Word

OpenOffice (.odt) or Microsoft Word (.doc) templates can use any font installed on the system.
Fonts may get remapped if a specified font is not available on the Windows system where OpenVPMS is deployed. To avoid this, install the required fonts as per https://support.microsoft.com/en-us/office/add-a-font-b7c5f17c-4426-4b53...


JasperReports templates (.jrxml) included in the distribution use the DejaVu Sans font. Prior to OpenVPMS 2.3, this was specified within each template. From OpenVPMS 2.3, it is specified in the file

net.sf.jasperreports.default.font.name=DejaVu Sans

DejaVu Sans is used as it is widely available, but doesn't support all languages.

To use an alternative font:

  1. package a JasperReports font extension, as per:
  2. copy the font extension .jar to <TOMCAT_HOME>\webapps\openvpms\WEB-INF\lib\
  3. change net.sf.jasperreports.default.font.name property in the <TOMCAT_HOME>\webapps\openvpms\WEB-INF\classes\jasperreports.properties to use the name of the new font extension
  4. restart Tomcat
Syndicate content