[#5117] - Auto reduce font size to fit text field

Feature request
Feedback Requested
Project: Severity:
Component: Reproducibility:
Assigned to:

Feature request to enable font size to be automatically reduced at report generation time to fit text to a fixed dimension text box (text retrieved from a data source).

Note: My company is willing to sponsor this enhancement, subject to agreeable terms.

bradc's picture
Joined: Nov 9 2010 - 11:22pm
Last seen: 3 years 11 months ago



Any update? It is pretty desirable feature. Some other products like "List & Label" have this feature.


Unfortunately at the moment it is the only solution, but it is so dirty.
How can you calculate the style according to the length of the string? f.e. compare two strings with length 5:
In rendered report this two strings in the same field will have totally different length.
F.e. there is such project as List&Label and it has in textfield parameter fit: shrink, break, cut...

  • Status:New» Feedback Requested


If we are to implement such feature, there are some questions that need to be answered first.

We are talking here about decreasing the font size so that the full text fits in the design time element size.

But since the text value could be styled text and different chunks of text have different font size, I guess the issue is about decreasing the font size for all chunks using a ratio.
So it is not about decreasing font size point by point, but rather decrease it with a ratio, especially considering that nowadays font size is no longer only integer values.

This is a little bit tricky because I assume not all export formats support the same precision when it comes to font size, so in some cases we would need to truncate or round up non integer font size values, resulting in the original styled text chunks becoming disproportionate with each other.



I agree. I would also like to see a feature for "fit", which scales it down OR up to use the available field space. Not sure it needs to super complicated, I'd personally be happy it it went integer value at a time to each font size iteratively until it fill the area. (I don't have mixed/styled text anyway)

  • Assigned:nobody»

I see that Active Report can be do it.
Please refer link : https://www.grapecity.com/blogs/is-there-a-way-to-automatically-resize-f...

So why Jasper report not add this feature ?