From: mark reid <jasper@ma...> - 2005-07-18 19:42:03
I'm getting started with using JasperReports, and I think a useful
feature would be to scale the font size of a text field to fit within
the box specified by the report. This is analogous to
stretchWithOverflow property, but rather than changing the size of the
box used on the filled report, it would decrease the font size until all
the text fits in the fixed-size field.
Since I'm still very new to JasperReports, the first question is: Can
this already be done?
If not, I'd like to take a stab at implementing the feature.
My idea is to set a "isShrinkWithOverflow" flag on the field, as well as
a maximum font size, and optional minimum font size. The text is then
scaled to size N such that minimumSize <= N <= maximumSize. If no
"minimumSize" is specified, font size 1 would be implied. Anything that
still overflowed would then be subject to the existing
Any comments, suggestions, or advice on the easiest way to get this done
would be much appreciated.