Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Add font to BirtViewerApp
Add font to BirtViewerApp [message #805512] Thu, 23 February 2012 16:21 Go to next message
Thomas Stemmer is currently offline Thomas Stemmer
Messages: 2
Registered: February 2012
Junior Member
Hello!

I'm deploying my reports with the BirtViewerApp as war-Package. To display the reports correctly I need to add a font to the ViewerApp.

I don't have direct access to the server so I can't add the font in any folder that is searched by the app. Is there any chance to add the font to the war package so the BirtViewerApp loads it via the classpath?

I'm open for all of your ideas Smile

Thanks!
Re: Add font to BirtViewerApp [message #805592 is a reply to message #805512] Thu, 23 February 2012 18:45 Go to previous messageGo to next message
Thomas Stemmer is currently offline Thomas Stemmer
Messages: 2
Registered: February 2012
Junior Member
After some further research I found out I can use
com.lowagie.text.FontFactory.register("com/foo/bar/arial.ttf");
to load fonts in standard java class.
Birt registered the fonts listed in the fontconfig.xml via FontFactory.registerDirectory

So the question is - is there any chance to call this line from a rptdesign-file?
If i just copy the line in initialize-method of the report I get:
TypeError: Cannot call property register in object [JavaPackage com.lowagie.text.FontFactory]. It is not a function, it is "object". (/report/method[@name="initialize"]#1) (Element ID:1)

I think the FontFactory isn't on the classpath...

Any ideas?
Re: Add font to BirtViewerApp [message #806310 is a reply to message #805592] Fri, 24 February 2012 15:17 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Is using an environment variable not an option?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=347431

Jason

On 2/23/2012 6:45 PM, Thomas Stemmer wrote:
> After some further research I found out I can use
> com.lowagie.text.FontFactory.register("com/foo/bar/arial.ttf"); to load
> fonts in standard java class.
> Birt registered the fonts listed in the fontconfig.xml via
> FontFactory.registerDirectory
>
> So the question is - is there any chance to call this line from a
> rptdesign-file?
> If i just copy the line in initialize-method of the report I get:
> TypeError: Cannot call property register in object [JavaPackage
> com.lowagie.text.FontFactory]. It is not a function, it is "object".
> (/report/method[@name="initialize"]#1) (Element ID:1)
> I think the FontFactory isn't on the classpath...
>
> Any ideas?
Previous Topic:Really dumb problem with the BIRT tutorial
Next Topic:How to integrate birt in Zend Ce with the help of Zend JavaBridge without tomcat server?
Goto Forum:
  


Current Time: Wed Aug 20 06:50:51 EDT 2014

Powered by FUDForum. Page generated in 0.01506 seconds