Skip to main content



      Home
Home » Archived » BIRT » [chart] how to set font face to san serif
[chart] how to set font face to san serif [message #955007] Tue, 23 October 2012 08:34 Go to next message
Eclipse UserFriend
the default axis labels uses a serif font:

getCaption().getFont().getName()


returns null Neutral.

I need to set a given FontDefinition to sans-serif (whatever is the system default for sans-serif). how to achieve this in java code?

i already tried this:

        
FontDefinition oldFont = xAxisPrimary.getLabel().getCaption().getFont();
        xAxisPrimary.getLabel()
                    .getCaption()
                    .setFont(FontDefinitionImpl.create("Helvetica",
                                                       oldFont.getSize(),
                                                       false,
                                                       false,
                                                       false,
                                                       false,
                                                       true,
                                                       oldFont.getRotation(),
                                                       oldFont.getAlignment()));

this is not working (x labels disapear)
the main problem is the name - i don't know the name and i don't know what "names" are available on a given system.
And i don't want to change any other aspects of font definition.

Re: [chart] how to set font face to san serif [message #958768 is a reply to message #955007] Fri, 26 October 2012 03:46 Go to previous message
Eclipse UserFriend
got it from here

getLabel().getCaption().getFont().setName("sans-serif");


this is working as expected!
Previous Topic:BIRT- date manipulation for query
Next Topic:birt freezes after 3 days under tomcat
Goto Forum:
  


Current Time: Tue May 13 01:42:46 EDT 2025

Powered by FUDForum. Page generated in 0.03281 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top