Locale and Fonts - Windows

Locale

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.

Fonts

***UPDATE for 1.9.1***

In the 1.9.1 release all standard reports have been converted to use the DejaVu fonts. Because these are built into JasperSoft Reports, all will work with no problems. If you build or use custom reports you should ensure that these use the DejaVu fonts rather than the default San Serif. (Look at the Style|Base section with JaspersoftStudio in any standard report to see how this is done.)

***End 1.9.1 update ***

The reports and documents in the release package have all been developed in a Windows system, and thus in general you do not have to worry about fonts. The Sans Serif font set in all the standard reports and documents will map to Arial.

NOTE: the following discussion applies ONLY to reports and documents that use jrxml content. For Forms and Letters that use Open Office odt (and Microsoft Word .doc) based content, you can happily use any font installed on the system.

However, if you do want to use another font (for example if you need to support Chinese characters when printing drug labels) then you need to understand that the fonts available to Jaspersoft Studio that you can choose from when creating or editing jrxml content are NOT necessarily available to OpenVPMS when it is generating the report/document. This is because when generating the jrxml based report/document, OpenVPMS only has access to a) the fonts mapped by <JAVA-HOME>\lib\fontconfig.properties; and b) those held in jar files in the <TOMCAT-HOME>\lib folder.

Hence if you need a non-standard font you will need to create a jar file containing it and place this in <TOMCAT-HOME>\lib.

To do this, first using Windows Explorer, copy the fonts you want to a new folder, say c:\temp\fonts - in the following I copied Comic Sans MS (which includes 4 files) and Arial Unicode MS Regular and you should have:  

Now start JasperSoft Studio and use Window|Preferences|Jaspersoft Studio|Fonts to get:

Click the 'Add From Path' button and specify the folder in which you saved the fonts, then click Finish to get:

Now click on both the fonts to select them and then press the Export button. Specify the file name you want (say MyOpenVPMSfonts) and press Save. You can then Cancel the above window to dismiss it.

In your c:\temp\fonts folder there will now be MyOpenVPMSfonts.jar which you can copy to <TOMCAT-HOME>\lib  (eg C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib). After you restart Tomcat, your new fonts will be used when you generate reports and documents that use them.

Syndicate content