Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:34 Go to next message
moritz du is currently offline moritz duFriend
Messages: 102
Registered: February 2010
Senior Member
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 07:46 Go to previous message
moritz du is currently offline moritz duFriend
Messages: 102
Registered: February 2010
Senior Member
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: Thu Apr 25 19:37:32 GMT 2024

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

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

Back to the top