Jump to content
We've recently updated our Privacy Statement, available here ×

Font size differences when deploying to CentOS


raph

Recommended Posts

Hello there,

We have a web application that has been working nicely for several years on a Fedora Linux production server. Inside this application are many reports made with JasperReports 3.5.

Recently we upgraded to a new production server running CentOS. The application runs correctly, but there are minor differences in alignment and metrics of the fonts. As a result, some of the text areas truncate the text they contain. More worrying is the Barcode4J component we have in some of the reports. In this component the text of the barcode does not appear at all. Any amount of resizing doesn't seem to make it reappear.

I was wondering what the problem could be. I did a "fc-list" on both the old and the new machine, and they had big differences in installed fonts. So I copied over all the fonts from the old server into the /usr/share/fonts directory. Now "fc-list" shows the same list on the new and the old server, but the problem remains the same.

The font used is "Helvetica"... nothing very exotic!

Any help or pointers would be greatly appreciated.

Thanks,

Raphael Neve

 



Post Edited by raphneve at 06/10/2010 12:25
Link to comment
Share on other sites

  • 6 months later...
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

FWIW, I never figured out what was going wrong. Instead we migrated to a different server running SuSE Entreprise Linux (SLES) and everything was back to normal.

The issue is with CentOS and it's obviously some missing/different packages, but I'm not experienced enough to know exactly why ...

Good luck !

Raphael

 

 

Link to comment
Share on other sites

I ran into a similar problem, but mine was the difference between running a report independently in JasperServer vs. running the same report on the same operating system but as part of a dashboard that contained two reports and a web URL element.  I later decided that the two reports were so well suited together that I wanted to make them subreports of a main report so they could appear together without a dashboard.  I then replaced the two reports in the dashboard with a single report (plus the web URL element), and the problem went away.  I never did figure out what caused the alignment issues within the confines of a single report, but thought I'd mention it just in case, both because my problem was potentially even more mysterious (single server, single operating system, same repository, etc.), and because I accidentally ended up with a workaround for it.

Carl

Link to comment
Share on other sites

It sounds like Raphael is all set now. In case it helps dpgaspar or others that read this thread later, the feature of Font Extensions was introduced in order to solve exactly this type of problem. When you use font extensions then the report will be generated identically regardless of how the server is setup and what fonts it has available.

Look in the JasperReports docs and samples, and look in other threads in the iReport and JasperReports forums for more information about font extensions.

Regards,
Matt
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...