Jump to content
  • define characters for Line-Breaking

    Assigned User teodord
    CategoryFeature request
    StatusFeedback Requested

    Hi guys,


    as I already posted in forum (http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=43147&catid=8 )


    we have problems with the line-break logic within JR (currently using 2.0.5).


    We would like to define some characters that are used by the linebreak measurer.

    Now a line will break if there is a space character (so between words). But if there is no space char within the line the text gets broken e.g. at a "." (if one is in the line). But this is not always wanted.


    So if we would define a FillParameter/Property where just some chars are allowed to break the line it would be more flexible. (e.g.just " ") and the remaining space would better used (less total lines because of less line-breaks).


    regards from Germany


    User Feedback

    Recommended Comments

    Changed Status from New to Feedback Requested

    Hi, C-BoxQuoting from the LineBreakMeasuerer Javadoc at https://docs.oracle.com/javase/7/docs/api/java/awt/font/LineBreakMeasurer.html:"LineBreakMeasurer implements the most commonly used line-breaking policy: Every word that fits within the wrapping width is placed on the line. If the first word does not fit, then all of the characters that fit within the wrapping width are placed on the line. At least one character is placed on each line."So are you saying that in your case, the break occurs at a dot character and not all characters that would fit on the line are allowed to stay on the this line and are moved to the next?Can we see an example?Thanks,Teodor
    Link to comment
    Share on other sites

    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...