stradale Posted April 30, 2010 Share Posted April 30, 2010 Does anyone have any experience implementing tab leaders? I'm using this code:Font arialFont = new java.awt.Font("Arial", Font.PLAIN, 10);FontRenderContext frc = new FontRenderContext(new AffineTransform(), true, true);Double textWidth = arialFont.getStringBounds(myString) ...and then moving on to filling the remainder of the line with dots/underscores/... I'm having trouble when using styles which in turn use different fonts. How can I use for example this next font?<bean id="myFontFamily" class="net.sf.jasperreports.engine.fonts.SimpleFontFamily"> <property name="name" value="myFont" /><property name="normal" value="fonts/LiberationSans-Regular.ttf" /><property name="bold" value="fonts/LiberationSans-Bold.ttf" /><property name="italic" value="fonts/LiberationSans-Italic.ttf" /><property name="boldItalic" value="fonts/LiberationSans-BoldItalic.ttf" /><property name="pdfEncoding" value="Identity-H" /><property name="pdfEmbedded" value="true" /></bean> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now